1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-10-18 05:04:18 +00:00

Fall back to render font for captions

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-08-09 18:40:09 +02:00
parent 40ef541372
commit c417556178
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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")
}