fix(thumbnailer): missing font panic

This commit is contained in:
Florian Schade
2025-12-31 12:17:11 +01:00
parent 38786ab291
commit 9c651af32d
3 changed files with 24 additions and 4 deletions
@@ -143,7 +143,11 @@ Scan: // Label for the scanner loop, so we can break it easily
textResult.MergeCommon(DefaultMergeMap)
for _, sRange := range textResult.ScriptRanges {
targetFontFace, _ := t.fontLoader.LoadFaceForScript(sRange.TargetScript)
targetFontFace, err := t.fontLoader.LoadFaceForScript(sRange.TargetScript)
if err != nil {
return nil, err
}
// if the target script is "_unknown" it's expected that the loaded face
// uses the default font
faceHeight := targetFontFace.Face.Metrics().Height