mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 09:37:26 +08:00
1 parent
77ffbe6a72
commit
c15547f0d2
27 files changed
+1166
-465
No files matched your search
@@ -92,11 +92,11 @@ func (r *Renderer) cachedTextGlyphPath(face *canvas.FontFace, glyph textGlyph) (
|
||||
direction: face.Direction,
|
||||
glyph: glyph,
|
||||
}
|
||||
if cached, ok := r.textGlyphPathCache[key]; ok {
|
||||
if cached, ok := r.canvasState().textGlyphPathCache[key]; ok {
|
||||
return cached.path, cached.width
|
||||
}
|
||||
path, width := textGlyphPath(face, glyph)
|
||||
r.textGlyphPathCache[key] = textGlyphPathCacheValue{path: path, width: width}
|
||||
r.canvasState().textGlyphPathCache[key] = textGlyphPathCacheValue{path: path, width: width}
|
||||
return path, width
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user