zephyr/samples/subsys/display/cfb_custom_font
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
..
fonts
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _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:
:zephyr_file:`samples/subsys/display/cfb_custom_font`.

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`
  This overlay config enables support for SSD16XX display controller
  on the reel_board.


Example building for the reel_board with SSD16XX display support:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/display/cfb_custom_font
   :host-os: unix
   :board: reel_board
   :goals: flash
   :compact: