400
Platforms
©2000-2008 Tibbo Technology Inc.
Raster Font File Format
This topic details font file format used by the LCD object. The font file is a resource
file that is added to your Tibbo Basic project. Like all other resource files
"attached" to your project, font files are accessible through the
object.
Use and interpretation of font file data, however, is the responsibility of the lcd.
object. The Romfile object merely stores these files.
Tibbo font files have "TRF" (Tibbo Raster Font) extension. TRF file format was
designed with the following considerations in mind:
Ability to handle large character sets (such as those required for Chinese
language support). Hence, the use of 16-bit character codes.
16-bit character sets usually have large "gaps" (i.e. areas of unused codes). The
TRF format offers an efficient way to define which characters are included into
the font file and allows to conduct very efficient character search within the file.
Support for proportional fonts. Hence, each character's width is individually
defined.
Support for fonts with anti-aliasing. Anti-aliasing is achieved by adjusting the
"intensity" (brightness) of individual pixels. In an anti-aliased font, each pixel of
character bitmap is represented by 2 or more bits of data. Fonts without anti-
aliasing just need 1 data bit/pixel because each pixel can only be ON or OFF. At
the time of writing, TiOS supported only fonts with 1 bit/pixel.
Support for vertical and horizontal character bitmap encoding. Displays with
= 1, 2, or 4 pack 8, 4, or 2 pixels into a single byte of display
memory. Problem is, some displays combine the pixels vertically (see drawing A
below), and some -- horizontally (drawing B). Text output on such displays is
more efficient if character bitmaps of the TRF file use the same direction of
packing.
TRF file format
The TRF file consists of four data areas:
Data area
Description
375
414