Skip to content

Commit 9eba3be

Browse files
committed
comment
1 parent 919fc39 commit 9eba3be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

system/ui/lib/text_measure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
def measure_text_cached(font: rl.Font, text: str, font_size: int, spacing: int = 0) -> rl.Vector2:
7+
"""Caches text measurements to avoid redundant calculations."""
78
key = hash((font.texture.id, text, font_size, spacing))
89
if key in _cache:
910
return _cache[key]

0 commit comments

Comments
 (0)