Fonts

Default

KGFX comes bundled with our default font, Arial. Here are the available font values you can pass as an argument of type const tftfont_t &f:

RegularBold
Arial_8Arial_8_Bold
Arial_9Arial_9_Bold
Arial_10Arial_10_Bold
Arial_11Arial_11_Bold
Arial_12Arial_12_Bold
Arial_13Arial_13_Bold
Arial_14Arial_14_Bold
Arial_16Arial_16_Bold
Arial_18Arial_18_Bold
Arial_20Arial_20_Bold
Arial_24Arial_24_Bold
Arial_28Arial_28_Bold
Arial_32Arial_32_Bold
Arial_40Arial_40_Bold
Arial_48Arial_48_Bold
Arial_60Arial_60_Bold
Arial_72Arial_72_Bold
Arial_96Arial_96_Bold
Example

For a function with the following arguments:

drawText(const char *txt, const tftfont_t &f, int color, int x, int y)

Call Arial_x directly.

ui.drawText("hello", Arial_12, TFT_YELLOW, 0, 30);