feat(性能优化): 优化PDF字形复用,降低多页导出耗时与内存分配
build.yaml / build (push) Successful in 42s

This commit is contained in:
xiaoqidun committed 2026-09-13 23:49:21 +08:00
1 parent e488d25775
commit ad00e95ae6
3 files changed
+28 -1

No files matched your search

+5
View File
@@ -396,6 +396,11 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64
scaleX = advanceLimit / glyphWidth
}
textWidth = glyphWidth * scaleX
if face.FauxBold != 0 {
if renderer, ok := ctx.Renderer.(*pdfRenderer); ok {
glyphPath = renderer.glyphPath(glyphPath, ctx.View().Scale(scaleX, 1))
}
}
if scaleX != 1 {
ctx.Push()
ctx.Translate(x, y)