#include <wit/font.h>
Public Member Functions | |
FontSymbol () | |
Public Attributes | |
char * | data |
signed char | texWidth |
signed char | texHeight |
signed char | leftBearing |
signed char | charWidth |
The FontSymbol class encapsulates the data for a single glyph.
For performance reasons, FontSymbol exposes its members directly instead of using accessor and mutator methods.
Generally you will only need to worry about FontSymbol objects if you are creating or customizing fonts, or if you need to query the metrics of a given character.
Be sure to read the warnings on the data member.
Definition at line 13 of file font.h.
wit::FontSymbol::FontSymbol | ( | ) |
Creates a new FontSymbol object with all metrics set to 0 pixels and null data.
You will not generally need to construct a FontSymbol object directly, as Font::setChar() will create them for you.
signed char wit::FontSymbol::charWidth |
char * wit::FontSymbol::data |
A pointer to a buffer containing a texture in IA4 format. This buffer must remain valid at all times. Most applications will store this buffer directly in the application binary.
As a result, all copies made from a FontSymbol object refer to the same buffer.
signed char wit::FontSymbol::leftBearing |
signed char wit::FontSymbol::texHeight |
The height of the glyph's texture, in pixels. Since FontSymbol textures are in the IA4 format, the height is a multiple of 4.
signed char wit::FontSymbol::texWidth |
The width of the glyph's texture, in pixels. Since FontSymbol textures are in the IA4 format, the width is a multiple of 8.