Skip to content

Commit

Permalink
text/v2: add comments to CacheGlyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Oct 25, 2024
1 parent 9449e0a commit 0da99e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions text/v2/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ func Measure(text string, face Face, lineSpacingInPixels float64) (width, height
// Draw and AppendGlyphs automatically create and cache necessary glyphs, so usually you don't have to call CacheGlyphs explicitly.
// If you really care about the performance, CacheGlyphs might be useful.
//
// CacheGlyphs is pretty heavy since it creates all the possible variations of glyphs.
// Call CacheGlyphs only when you really need it.
//
// CacheGlyphs is concurrent-safe.
func CacheGlyphs(text string, face Face) {
var x, y float64
Expand Down

0 comments on commit 0da99e2

Please sign in to comment.