FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
240
Product Page
Document Feedback Copyright © Bridgetek Limited
5.52 CMD_SETFONT - set up a custom font
CMD_SETFONT is used to register one custom defined bitmap font into the FT800 co-
processor engine. After registration, the FT800 co-processor engine is able to use the
bitmap font with its co-processor command.
About the details about how to set up custom font, please refer to ROM and RAM Fonts.
C prototype
void cmd_setfont( uint32_t font,
uint32_t ptr );
Command layout
Parameters
font
The bitmap handle from 0 to 14. Bitmap handle 15 can be used conditionally.
Please see 4.6
ptr
The metric block address in RAM. 4 bytes aligned is required.
Examples
With a suitable font metric block loaded in RAM at address 1000, to set it up for use
with objects as font 7:
cmd_setfont(7, 1000);
cmd_button(20, 20, // x,y
120, 40, // width,height in pixels
7, // font 7, just loaded
0, // default options,3D style
"custom font!");
Code snippet 17 CMD_SETFONT example