mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
051fc3b65e
commit
cf8dfd046b
21 files changed
+1071
-237
No files matched your search
@@ -18,7 +18,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/tdewolff/canvas"
|
||||
"github.com/tdewolff/font"
|
||||
)
|
||||
|
||||
// ptPerMM 为毫米转换为排版点的比例
|
||||
@@ -183,7 +182,8 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64
|
||||
ctx.Pop()
|
||||
return
|
||||
}
|
||||
face := ff.Face(sizePt, fillPaint, fontStyle, canvas.FontNormal, font.NoHinting)
|
||||
face := ff.Face(sizePt, fillPaint, fontStyle, canvas.FontNormal)
|
||||
face.Hinting = 0
|
||||
recoverBaseline := len(obj.TextCode) > 0 && obj.TextCode[0].Y == ""
|
||||
var metrics canvas.FontMetrics
|
||||
if textRun != nil || recoverBaseline {
|
||||
|
||||
Reference in new issue
Block a user