natiny.font.get_atlas

Lua
natiny.font.get_atlas(font) -> texture

Returns the texture the font's glyphs are baked into.

Parameters

Name Type Description
font number Font handle from natiny.font.create

Returns

Type Description
number or nil Atlas texture handle, or nil for an invalid font

Example

Lua
local atlas = natiny.font.get_atlas(font)

natiny.render.texture(atlas, 0, 0, 256, 256)

Notes