feat(渲染编辑): 优化渲染编辑完善资源保存
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-05 12:49:51 +08:00
1 parent 5dcd7a4e8d
commit 6c14eef1ee
39 files changed
+1926 -420

No files matched your search

+2 -6
View File
@@ -14,11 +14,7 @@
package ofdgo
import (
"crypto/sha256"
"github.com/tdewolff/canvas"
)
import "github.com/tdewolff/canvas"
// loadFont 加载字体
// 入参: fontID 字体ID
@@ -42,7 +38,7 @@ func (r *Renderer) loadFont(fontID string) *canvas.FontFamily {
fontData := resolved.Data
fontStyle := canvasFontStyle(of)
if resolved.digest == ([32]byte{}) {
resolved.digest = sha256.Sum256(fontData)
resolved.digest = r.fontDigest(fontData)
}
key := canvasFontKey{digest: resolved.digest, name: of.FontName, style: fontStyle}
cache := r.canvasFontFamilies()