From 0da99e2c37ed05229473e6b9c921f8e2b2f2966b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 25 Oct 2024 17:41:24 +0900 Subject: [PATCH] text/v2: add comments to CacheGlyphs --- text/v2/text.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/text/v2/text.go b/text/v2/text.go index a3fb07ff1..35f48464b 100644 --- a/text/v2/text.go +++ b/text/v2/text.go @@ -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