geFont
From GriffinEngine
Usage
geFont is used to load fonts from GLF file format. A tool for converting normal fonts into GLF is located in the SVN repository: \GriffinEngine\glFont2\glfont.exe
.
geFont's drawing methods should not be called by the game code. Instead use geText2D, which provides a high-level wrapper for font rendering and integration into geHUD.
Inheritance
Base classes
- geObject
- geResource
- geFont
- geResource
Reference
Constructors
geFont( const string& filename, bool antialiasing=false );
Methods
void Begin();
- Set up material and GL flags for drawing text with this font.
void DrawString( const string &text, float x, float y, color c1=0xFFFFFFFF, double scale=1.0 );
- Draw a single-color string at a specified location. Default color is opaque white, 100% scale.
void DrawString( const string &text, float x, float y, color c1, color c2, double scale=1.0 );
- Same as above, but font is colored with a vertical gradient, smoothly blending c1 and c2.
void CalculateStringSize( const string& str, double& w, double& h );
- Calculate the total width and height of a string, in pixels, assuming 100% scale.
Resources |
---|
geResourceManager · geResource |
geAnimation · geBitmap · geFont · geMaterial · geMesh · GeSound · GeSprite · GeSpriteSheet |