feat(转换能力): 新增批量转换功能
build.yaml / build (push) Successful in 41s

This commit is contained in:
xiaoqidun committed 2026-09-26 13:39:15 +08:00
1 parent d9046af3b0
commit ecf221c1c0
12 files changed
+1222 -30

No files matched your search

+12 -1
View File
@@ -14,7 +14,11 @@
package ofdgo
import "github.com/tdewolff/canvas"
import (
"fmt"
"github.com/tdewolff/canvas"
)
// loadFont 加载字体
// 入参: fontID 字体ID
@@ -30,6 +34,13 @@ 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 {