feat(字体解耦): 解耦字体依赖,完善字体处理
build.yaml / build (push) Successful in 47s

This commit is contained in:
xiaoqidun committed 2026-10-11 00:52:01 +08:00
1 parent 051fc3b65e
commit cf8dfd046b
21 files changed
+1071 -237

No files matched your search

+4 -1
View File
@@ -51,7 +51,10 @@ func (r *Renderer) loadFont(fontID string) *canvas.FontFamily {
return ff
}
ff := canvas.NewFontFamily(fmt.Sprintf("ofdgo-%x-%d", resolved.digest, fontStyle))
if err := ff.LoadFont(fontData, 0, fontStyle); err != nil {
canvasFontLoadMu.Lock()
err = ff.LoadFont(fontData, 0, fontStyle)
canvasFontLoadMu.Unlock()
if err != nil {
r.renderError = err
return nil
}