PrintFont

Family: Text · One form

What it does

PrintFont writes to a Text object: it sets rather than reads. It takes fontID (an integer), and returns nothing. fontID is the id of a Font object, the one LoadFont returned: it is how the call knows what to act on.

Syntax

PrintFont(fontID integer)

Parameters

NameType
fontIDinteger

Every form returns

nothing

Example · generated

font = LoadFont("assets/font.ttf")PrintFont(font)DO  Sync()LOOP

LoadFont is there to give the call something to act on; PrintFont is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

68 commands in Text