Skip to content

raylib.LoadFontEx

JoeStrout edited this page Oct 17, 2026 · 4 revisions

Load font from file with defined codepoints and generation size NOTE: NULL for codepoints and 0 for codepointCount to load the default character set (32..126), font size is provided in pixels height

Parameters

Parameter Default Value Note
fileName
fontSize 20
codepoints null
codepointCount 0

Return value

Condition Return Value
(always) map

Notes

Example

// Load a TTF font at 48px with the default character set
font = raylib.LoadFontEx("resources/myfont.ttf", 48, null, 0)
if raylib.IsFontValid(font) then
    raylib.DrawTextEx font, "Big text!", [50, 100], 48, 2, raylib.WHITE
    raylib.UnloadFont font
end if

Clone this wiki locally