mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
This commit is contained in:
1 parent
e5e07f92cd
commit
853ffc6327
9 files changed
+70
-183
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user