natiny.render.text

Lua
natiny.render.text(font, x, y, text)

Draws text with the given font on the currently bound render target using the current draw color.

Parameters

Name Type Description
font number Font handle from natiny.font.create
x number X position in pixels
y number Y position in pixels
text string UTF-8 text to draw

Example

Lua
natiny.render.text(font, 20, 20, "Score: 100")