TFont Struct Reference
[Tonc Text Engine]
Font description struct.
More...
#include <tonc_tte.h>
Data Fields | |
const void * | data |
Character data. | |
const u8 * | widths |
Width table for variable width font. | |
const u8 * | heights |
Height table for variable height font. | |
u16 | charOffset |
Character offset. | |
u16 | charCount |
Number of characters in font. | |
u8 | charW |
Character width (fwf). | |
u8 | charH |
Character height. | |
u8 | cellW |
Glyph cell width. | |
u8 | cellH |
Glyph cell height. | |
u16 | cellSize |
Cell-size (bytes). | |
u8 | bpp |
Font bitdepth;. | |
u8 | extra |
Padding. Free to use. |
Detailed Description
Font description struct.
The TFont
contains a description of the font, including pointers to the glyph data and width data (for VWF fonts), an ascii-offset for when the first glyph isn't for ascii-null (which is likely. Usually it starts at ' ' (32)).
The font-bitmap is a stack of cells, each containing one glyph each. The cells and characters need not be the same size, but the character glyph must fit within the cell.
The formatting of the glyphs themselves should fit the rendering procedure. The default renderers use 1bpp 8x8 tiled graphics, where for multi-tiled cells the tiles are in a vertical 'strip' format. In an 16x16 cell, the 4 tiles would be arranged as:
0 | 2 |
1 | 3 |
The documentation for this struct was generated from the following file:
Generated on Mon Aug 25 17:03:57 2008 for libtonc by
