feat(渲染能力): 统一字体回退逻辑,修复阅读与PDF导出字体不一致的问题
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-09-09 20:46:17 +08:00
1 parent e5e07f92cd
commit 853ffc6327
9 files changed
+70 -183

No files matched your search

+8
View File
@@ -196,6 +196,14 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64
for i, glyph := range glyphs {
str := glyph.Text
drawAsGlyphPath := drawAsPath || glyph.GlyphID >= 0
if !drawAsGlyphPath {
for _, char := range str {
if face.Font.GlyphIndex(char) == 0 {
drawAsGlyphPath = true
break
}
}
}
var glyphPath *canvas.Path
var glyphWidth float64
if drawAsGlyphPath {