Skip to content

raylib.LoadFontEx

JoeStrout edited this page Apr 29, 2026 · 3 revisions

Load Font from TTF or BDF font file with generation parameters NOTE: You can pass an array with desired characters, those characters should be available in the font if array is NULL, default char set is selected 32..126

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