Legacy:GetSystemFont

From Spherical
Revision as of 21:46, 24 June 2013 by Apollolux (talk | contribs) (added navbox)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns A Sphere font object that is the system font.rfn found in the system/ folder of the Sphere directory.

Usage

Font GetSystemFont();


Notes

  • It can be changed by replacing the font.rfn file in the system/ folder in the Sphere directory. Keep in mind that someone else may have left their system font file untouched or replaced it with a different one; if this is the case consider loading a font local to your project instead.
  • It's also useful in case you want to quickly throw up some debug numbers.

Examples

Drawing some text to the screen with Sphere's font.

var font = GetSystemFont();

while (!IsKeyPressed(KEY_ESCAPE) {
    for (var i = 0; i < 10; ++i) {
        font.drawText(0, i*16, The number is: " + i);
    }
    FlipScreen();
}


See also

API:Font/navbox