Structure that contains the necessary data to generate a bitmap Font Texture from an .TTF
or .OTF
font file. Fonts are generally used to draw on screen either in two or three dimension. Coupled with a signed distance field they can be used to draw smooth anti-aliased text that look good from every distance using the Alpha-Tested Magnification for Vector Textures and Special Effects technique.
See Also
Static Variables
Name | Description |
texture | Parent Texture asset the Font data is attached to. |
Declaration
|
advance | The current X and Y position of the Font cursor allowing you to extra the size in pixels of a specific text. |
Declaration
|
Variables
Name | Description |
size | The maximum size allowed for each cell (or each character if you prefer). |
Declaration Range 1 to 256
|
ascii_start | The first ASCII the Font map should begin with. |
Declaration unsigned char ascii_start
|
ascii_count | The total number of ASCII (after the ascii_start ) should be generated. |
Declaration unsigned char ascii_count
|
tab_spaces | How many spaces a tabulation is equivalent to. |
Declaration
|
ascender | Offset between each character based on the Font size and the specifications found in the .TFF or .OTF data. |
Declaration Range 0.0 to 256.0
|
Functions
Name | Description |
GetStringSize | Retrieve the two-dimensional size of a text using the active Font. |
Declaration vec2 GetStringSize( const char *s ) Parameters
s : A string to retrieve its size.
Return Value
The width and the height in pixels of the text s received in parameter.
|
ClearOffsets | Reset the internal offset used when processing a string. |
Declaration void ClearOffsets( void )
|
GetAsciiQuad | Return the width in pixels for a specific ASCII to advance to the next character. |
Declaration float GetAsciiQuad( const char ascii)
Return Value
The size of the ascii specified.
|