mirror of
https://github.com/Luzifer/streamdeck.git
synced 2024-12-20 09:41:19 +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 {
|
||||
var fontFile = userConfig.CaptionFont
|
||||
if fontFile == "" {
|
||||
fontFile = userConfig.RenderFont
|
||||
}
|
||||
|
||||
// Render text
|
||||
f, err := t.loadFont(userConfig.CaptionFont)
|
||||
f, err := t.loadFont(fontFile)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Unable to load font")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue