feat(文字图像): 修复文字定位及图像导出
build.yaml / build (push) Successful in 44s

This commit is contained in:
xiaoqidun committed 2026-10-03 12:38:05 +08:00
1 parent f2dbf72885
commit 8de701dbd4
7 files changed
+162 -12

No files matched your search

+2 -1
View File
@@ -18,6 +18,7 @@ import (
"strings"
"github.com/tdewolff/canvas"
"github.com/tdewolff/font"
)
const ptPerMM = 72.0 / 25.4
@@ -181,7 +182,7 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64
ctx.Pop()
return
}
face := ff.Face(sizePt, fillPaint, fontStyle, canvas.FontNormal)
face := ff.Face(sizePt, fillPaint, fontStyle, canvas.FontNormal, font.NoHinting)
recoverBaseline := len(obj.TextCode) > 0 && obj.TextCode[0].Y == ""
var metrics canvas.FontMetrics
if textRun != nil || recoverBaseline {