feat(渲染逻辑): 完善图片另存与缺字体处理
build.yaml / build (push) Successful in 52s

This commit is contained in:
xiaoqidun committed 2026-09-28 22:59:39 +08:00
1 parent 30d9699385
commit 4d0a909de5
14 files changed
+438 -50

No files matched your search

+1 -12
View File
@@ -14,11 +14,7 @@
package ofdgo
import (
"fmt"
"github.com/tdewolff/canvas"
)
import "github.com/tdewolff/canvas"
// loadFont 加载字体
// 入参: fontID 字体ID
@@ -34,13 +30,6 @@ func (r *Renderer) loadFont(fontID string) *canvas.FontFamily {
}
of := r.Reader.fontCache[fontID]
if len(resolved.Data) == 0 {
if !r.textOnly {
name := fontID
if of != nil && of.FontName != "" {
name = of.FontName
}
r.renderError = fmt.Errorf("font %q is unavailable", name)
}
return nil
}
if of == nil {