1
0
Fork 0
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:
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 { 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")
} }