FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
148
Copyright © Bridgetek Limited
Table 9 FT800 Font metrics block format
Address
Size
Value
p + 0
128
width of each font character, in pixels
p + 128
4
font bitmap format, for example L1, L4 or L8
p + 132
4
font line stride, in bytes
p + 136
4
font width, in pixels
p + 140
4
font height, in pixels
p + 144
4
pointer to font graphic data in memory
For the ROM fonts, these blocks are also in ROM, in an array of length 16. The address of
this array is held in ROM location 0xffffc. For example to find the width of character 'g'
(ASCII 0x67) in font 31:
read 32-bit pointer p from 0xffffc
widths = p + (148 * (31 - 16)) (table starts at font 16)
read byte from memory at widths[0x67]
For the built-in ROM font of the FT800, the valid character range for one bitmap handle
is printable ASCII code, i.e., from 32 to 127, both inclusive. For custom RAM font, the
ASCII code range of valid characters is from 1 to 127.
To use a custom font in the user-interface objects:
Select a bitmap handle from 0 to 14
Load the font bitmap into memory
Set
the
bitmap
parameters
using
commands
BITMAP_SOURCE,
BITMAP_LAYOUT and BITMAP_SIZE.
Create and download a font metric block in RAM. The address of metric block
shall be
4 bytes aligned
.
Use command CMD_SETFONT to register the new font with the selected
handle.
Use the selected handle in any co-processor command font argument.
5.4
Cautions
For some of the widgets, if the input parameter values are more than 512 pixel
resolution, the generated widgets may not be proper.
Behavior of CMD_TRACK is not defined if the center of the track object (in case of rotary
track) or top left of the track object (in case of linear track) is outside the display region.