2018-11-09 04:56:35 +08:00
|
|
|
.. _cfb_custom_fonts:
|
|
|
|
|
|
|
|
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:
|
2019-03-09 06:21:37 +08:00
|
|
|
:zephyr_file:`samples/display/cfb_custom_font`.
|
2018-11-09 04:56:35 +08:00
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
|
|
|
There are different configuration files in the cfb_custom_font
|
|
|
|
directory:
|
|
|
|
|
|
|
|
- :file:`prj.conf`
|
|
|
|
Generic config file, normally you should use this.
|
|
|
|
|
|
|
|
- :file:`boards/reel_board.conf`
|
2019-07-04 05:40:38 +08:00
|
|
|
This overlay config enables support for SSD16XX display controller
|
2018-11-09 04:56:35 +08:00
|
|
|
on the reel_board.
|
|
|
|
|
|
|
|
|
2019-07-04 05:40:38 +08:00
|
|
|
Example building for the reel_board with SSD16XX display support:
|
2018-11-09 04:56:35 +08:00
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/display/cfb_custom_font
|
|
|
|
:host-os: unix
|
|
|
|
:board: reel_board
|
|
|
|
:goals: flash
|
|
|
|
:compact:
|