Browse docsfont.create
On this page
API method

font.create

Returns a Consolas font.

Syntax

Atlas Script
font.create(size = 1, color = rgb.white)

Parameters

size = 1 Optional
Font scale used when creating the Atlas font value.
color = rgb.white Optional
Atlas RGB color value used by the requested visual or feedback operation.

Return value

Returns font.

Remarks

Returns a Consolas font. size defaults to 1 and clamps to 0.5 through 4. color defaults white and accepts #RRGGBB/0xRRGGBB strings or rgb.* constants; literal color names are not parsed. Example: font hud = font.create(1.5, rgb.purple);

Examples

Draw text and a status message.atlas
font hud = font.create(1.4, rgb.lime);

event on_frame() {
    ui.print(hud, 0.05, 0.08, string.format("Frame {}", frame));
    ui.status(string.format("Runtime age {} ms", time_ms));
}

event on_stop() {
    ui.clear();
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.