-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageDrawTextEx
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw text (custom sprite font) within an image (destination)
| Parameter | Default Value | Note |
|---|---|---|
| dst | ||
| font | ||
| text | ||
| position | ||
| fontSize | ||
| spacing | ||
| tint |
None.
font = raylib.LoadFont("myfont.ttf")
img = raylib.GenImageColor(200, 40, raylib.BLACK)
raylib.ImageDrawTextEx img, font, "Hello!", [5, 5], 20, 2, raylib.WHITE
raylib.ExportImage img, "label_custom.png"
raylib.UnloadImage img
raylib.UnloadFont font