text: Update comments

This commit is contained in:
Hajime Hoshi 2021-04-24 03:27:56 +09:00
parent 3df31c0fce
commit 4f6ad4e60b

View File

@ -276,7 +276,7 @@ func BoundString(face font.Face, text string) image.Rectangle {
// explicitly. However, for example, when you call Draw for each rune of one big text, Draw tries to create the glyph
// cache and render it for each rune. This is very inefficient because creating a glyph image and rendering it are
// different operations and can never be merged as one draw call. CacheGlyphs creates necessary glyphs without
// rendering them so that these operations are likely merged into one draw call.
// rendering them so that these operations are likely merged into one draw call regardless of the size of the text.
//
// If a rune's glyph is already cached, CacheGlyphs does nothing for the rune.
func CacheGlyphs(face font.Face, text string) {