-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.MeasureTextEx
JoeStrout edited this page Apr 29, 2026
·
3 revisions
Measure string size for Font
| Parameter | Default Value | Note |
|---|---|---|
| font | ||
| text | ||
| fontSize | 20 | |
| spacing | 0 |
| Condition | Return Value |
|---|---|
| (always) | number |
// Measure text dimensions using a custom font
font = raylib.LoadFont("resources/myfont.ttf")
if raylib.IsFontValid(font) then
size = raylib.MeasureTextEx(font, "Hello!", 24, 1)
print "Width: " + size[0] + " Height: " + size[1]
raylib.UnloadFont font
end if