Font

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.
advance The current X and Y position of the Font cursor allowing you to extra the size in pixels of a specific text.

Variables


Name Description
size The maximum size allowed for each cell (or each character if you prefer).
ascii_start The first ASCII the Font map should begin with.
ascii_count The total number of ASCII (after the ascii_start) should be generated.
tab_spaces How many spaces a tabulation is equivalent to.
ascender Offset between each character based on the Font size and the specifications found in the .TFF or .OTF data.

Functions


Name Description
GetStringSize Retrieve the two-dimensional size of a text using the active Font.
ClearOffsets Reset the internal offset used when processing a string.
GetAsciiQuad Return the width in pixels for a specific ASCII to advance to the next character.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA