-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.LoadFontFromMemory
JoeStrout edited this page Apr 29, 2026
·
3 revisions
Load font from memory buffer, fileType refers to extension: i.e. ".ttf"
| Parameter | Default Value | Note |
|---|---|---|
| fileType | ||
| fileData | ||
| fontSize | ||
| codepoints | null | |
| codepointCount | 0 |
| Condition | Return Value |
|---|---|
| (always) | map |
// Load a font from raw file data already in memory
fileData = file.loadRaw("resources/myfont.ttf")
font = raylib.LoadFontFromMemory(".ttf", fileData, 32, null, 0)
if raylib.IsFontValid(font) then
raylib.DrawTextEx font, "From memory!", [10, 10], 32, 1, raylib.WHITE
raylib.UnloadFont font
end if