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
@@ -103,7 +103,12 @@ func (r *Renderer) cachedTextGlyphPath(face *canvas.FontFace, glyph textGlyph) (
|
||||
}
|
||||
outlines := r.canvasState().fontOutlines[face.Font]
|
||||
if outlines == nil {
|
||||
outlines = &sfntOutliner{font: face.Font.SFNT}
|
||||
metrics, err := parseSFNTFont(fontSFNTData(face.Font.Tables))
|
||||
if err != nil {
|
||||
r.renderError = err
|
||||
return &canvas.Path{}, 0
|
||||
}
|
||||
outlines = &sfntOutliner{font: metrics}
|
||||
r.canvasState().fontOutlines[face.Font] = outlines
|
||||
}
|
||||
path, width, err := textGlyphPath(face, glyph, outlines)
|
||||
|
||||
Reference in new issue
Block a user