FontGen
   Multilingual
   Grayscale
   Graphics support
   Rotation
   Cross Platform
   Compression
   Release notes
   Get it
  
Keil LCD extension
Display library
FAQ

 

FontGen produces many constant tables which should be put in the code space by the linker. Each compiler or development environment has different keywords/techniques to put the variables to the code space.

FontGen uses user provided variable definition and declaration patterns to let the user such a customization. These patterns have a type and name component. These are set by FontGen but the rest is provided by FontGen.

Variable declaration pattern is used while declaring arrays/structs in the H file. Variable definition pattern is used while defining arrays/structs in the C file. Pointer definition pattern is used while defining pointers in the C file.

Example pattern

Example outputs

%t %n

extern FONT_DEF Verdana_17_n_nnnn_0_c;
const unsigned char font_Verdana_17_n_nnnn_0_c_width_table[]; 
unsigned char *mapping_table;

%t code %n

extern FONT_DEF code Verdana_17_n_nnnn_0_c; 
const unsigned char code font_Verdana_17_n_nnnn_0_c_width_table[]; 
unsigned char code *mapping_table;
%t %n PROGMEM
extern FONT_DEF Verdana_17_n_nnnn_0_c PROGMEM; 
const unsigned char font_Verdana_17_n_nnnn_0_c_width_table[] PROGMEM; 
unsigned char *mapping_table PROGMEM; 

Recommended settings

For gcc/AVR

For Keil

Variable declaration pattern %t %s %t code %n
Variable definition pattern %t %n PROGMEM %t code %n
Pointer declaration pattern %t %s %t code %n

Copyright 2006-2015 - dreamsware - info@dreamsware.info