zephyr/subsys/fb/README_fonts.txt
Peter A. Bigot 9a0d9e3af0 scripts: gen_cfb_font_header: modify to replicate cfb fonts
The content of subsys/fb/cfb_fonts cannot be replicated by the existing
script due to lack of positioning options and use of a full-color frame
buffer, which affects the generated bitmap.  Switch to the solution used
in the original script, add the required options, and document the
process of regenerating the fonts.

This commit also determines the required bounding box for the glyphs to
be sure that the user-provided value is sufficient to avoid partial
characters.  Ideally the calculated width and height would be used for
font characters, but this would require significant restructuring of the
script to make calculated values available at the point where the
arguments are used to produce output.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-31 05:43:50 -04:00

20 lines
628 B
Plaintext

The DroidSansMono.ttf font used to generate the cfb_fonts bitmaps can be
obtained from:
https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/DroidSansMono.ttf
To reproduce the font bitmaps use these commands:
${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py \
-i DroidSansMono.ttf \
-x 10 -y 16 -s 14 --center-x \
-o cfbv_1016
${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py \
-i DroidSansMono.ttf \
-x 15 -y 24 -s 22 --center-x --y-offset -2 \
-o cfbv_1524
${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py \
-i DroidSansMono.ttf \
-x 20 -y 32 -s 30 --center-x --y-offset -3 \
-o cfbv_2032