mirror of
https://github.com/Luzifer/streamdeck.git
synced 2024-12-20 17:51:21 +00:00
Fall back to render font for captions
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
40ef541372
commit
c417556178
1 changed files with 6 additions and 1 deletions
|
@ -70,8 +70,13 @@ func (t *textOnImageRenderer) DrawBigText(text string, fontSizeHint float64, bor
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *textOnImageRenderer) DrawCaptionText(text string) error {
|
func (t *textOnImageRenderer) DrawCaptionText(text string) error {
|
||||||
|
var fontFile = userConfig.CaptionFont
|
||||||
|
if fontFile == "" {
|
||||||
|
fontFile = userConfig.RenderFont
|
||||||
|
}
|
||||||
|
|
||||||
// Render text
|
// Render text
|
||||||
f, err := t.loadFont(userConfig.CaptionFont)
|
f, err := t.loadFont(fontFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Unable to load font")
|
return errors.Wrap(err, "Unable to load font")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue