Custom Fonts

Overview

A simple example showing how to generate Character Framebuffer (CFB) font headers automatically at build time.

This example generates a font with font elements for 6 sided dice from a PNG image, and then uses the generated header (cfb_font_dice.h) to show the font elements on the display of a supported board.

The source code for this sample application can be found at: samples/display/cfb_custom_font.

Building and Running

There are different configuration files in the cfb_custom_font directory:

  • prj.conf Generic config file, normally you should use this.
  • boards/reel_board.conf This overlay config enables support for SSD1673 display controller on the reel_board.

Example building for the reel_board with SSD1673 display support:

cd $ZEPHYR_BASE/samples/display/cfb_custom_font
mkdir build && cd build
cmake -GNinja -DBOARD=reel_board ..
ninja flash