LifeLua 21-08-2025
Documentation for LifeLua, a Lua interpreter for the PS Vita
Loading...
Searching...
No Matches
font

Loading fonts for draw.text() More...

Detailed Description

Without loading a font, draw.text() uses the PS Vita's built-in system font. Load a font with font.load() and pass it to draw.text(), draw.textwidth() and draw.textheight().

Functions

font font.load (string path)
 

Function Documentation

◆ font.load()

font font.load ( string path)

Loads a font file. Supported types are the PS Vita's .PGF and .PVF fonts, and anything FreeType can open, like .TTF, .OTF and .WOFF.

Parameters
pathPath to the font file (e.g. "app0:font.ttf")
Returns
The loaded font. Raises an error if the file is missing or can't be loaded.
Example:
local myfont = font.load("app0:font.ttf")
draw.text(10, 10, "Hello!", color.new(255, 255, 255), myfont, 1.5)