-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.LoadFontFromImage
JoeStrout edited this page Apr 29, 2026
·
3 revisions
Load an Image font file (XNA style)
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| key | Color{255, 0, 255, 255} | |
| firstChar | 32 |
| Condition | Return Value |
|---|---|
| (always) | map |
// Load a bitmap font from an image using magenta as the key color
img = raylib.LoadImage("resources/font_atlas.png")
font = raylib.LoadFontFromImage(img, "#FF00FF", 32)
if raylib.IsFontValid(font) then
raylib.DrawTextEx font, "Bitmap font!", [10, 10], 16, 1, raylib.WHITE
raylib.UnloadFont font
end if
raylib.UnloadImage img