2.2 GFX System Font

The GFX System font provides a low-level static system font to use with displays. It is a lightweight implementation graphical font, with limited flexibility. Excellent for printing system messages and debug output to a display. It is typically used in less fancy graphical applications, where selections of fonts is not important, but rather low flash and RAM footprint.

The system font objects are globally available for a graphical application. System fonts are by design read only, hence there are not any functions to change them during run-time. If the application needs additional fonts it should add additional font objects.

In the example, it prints messages by using:

gfx_mono_draw_string("My name is\r\nXMEGA-A1U Xplained!\r\nAnd I'm board...",
	0, 0, &sysfont);

The font characters are defined in ASF\common\components\display\ssd1306\font.c.

The system font functions are listed as below:

Table 2-2. System Font Functions
Function nameDescription
gfx_mono_draw_char()Draw a character located in RAM
gfx_mono_draw_string()Draw a string located in RAM
gfx_mono_get_string_bounding_box()Draw a bounding box located in RAM
gfx_mono_draw_progmem_string()Draw a string located in flash
gfx_mono_get_progmem_string_bounding_box()Draw a bounding box located in flash