Difference between revisions of "Legacy:GetSystemFont"

From Spherical
Jump to: navigation, search
(Created GetSystemFont page)
 
m
Line 1: Line 1:
 
[[Category:Functions]]
 
[[Category:Functions]]
  
Returns A Sphere [[API:font|font] object that is the system font.rfn found in the system/ folder of the Sphere directory.
+
Returns A Sphere [[API:font|font]] object that is the system font.rfn found in the system/ folder of the Sphere directory.
  
 
==Usage==
 
==Usage==

Revision as of 22:21, 20 May 2013


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.

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