Font Assets
This directory stores source fonts used to generate Trail Mate font assets.
GNU Unifont for T-Deck Pro
- Pixel source:
unifont-17.0.05.bdf.gz - Source:
https://unifoundry.com/unifont/index.html - Release: GNU Unifont 17.0.05
- License: GNU GPL v2 or later with the GNU font embedding exception, or SIL Open Font License 1.1.
- T-Deck Pro output: an English-only 16px, 1bpp subset at
modules/ui_shared/src/ui/tdeck_pro/font/tdeck_pro_unifont_16.c. Localized glyphs remain downloadablefont.binpacks. Thezh-Hansbundle supplies matching Pro-onlytdeckpro-zh-hans-coreandtdeckpro-zh-hans-extsubsets without changing the Noto packs used on other displays.
The generator reads the BDF rows directly and writes them as LVGL 1bpp pixels; it does not invoke a scalable-font renderer, hinting stage, or resampler. Regenerate the committed source from the repository root with:
python tools/generate_tdeck_pro_unifont.py
The generator rejects any glyph that is not a native 8x16/16x16 Unifont cell.
Its generated source contains exactly ASCII U+0020 through U+007E; Chinese
and every other localized glyph remain in downloadable font packs.
Noto Sans CJK SC
- File:
NotoSansCJKsc-Regular.otf - Source:
https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/SimplifiedChinese/NotoSansCJKsc-Regular.otf - License: SIL Open Font License 1.1 (OFL)
Noto Naskh Arabic
The Arabic recipe retains Naskh for all available Arabic glyphs and uses
Noto Sans only for missing symbols such as the ellipsis. Outline fallback
sources are specified with fallback_font= in build.ini and repeated
--fallback-font arguments in the generator; they never override primary
glyphs or resample the native BDF pixel font.
- File:
NotoNaskhArabic-Regular.otf - Source:
https://raw.githubusercontent.com/googlefonts/noto-fonts/main/unhinted/otf/NotoNaskhArabic/NotoNaskhArabic-Regular.otf - License: SIL Open Font License 1.1 (OFL)
Noto Sans (Latin extensions and symbol fallback)
- File:
NotoSans-Regular.ttf - Source:
https://raw.githubusercontent.com/notofonts/noto-fonts/main/hinted/ttf/NotoSans/NotoSans-Regular.ttf - SHA-256:
b85c38ecea8a7cfb39c24e395a4007474fa5a4fc864f6ee33309eb4948d232d5 - License: SIL Open Font License 1.1, reproduced in
NotoSans-LICENSE.txt. - Used for the European Latin extension pack because the CJK source does not contain every required Polish glyph. It remains an external downloadable font, not another compiled-in firmware font.
Noto Emoji Monochrome
- File:
NotoEmoji-Regular.ttf - Source:
https://raw.githubusercontent.com/zjaco13/Noto-Emoji-Monochrome/main/fonts/NotoEmoji-Regular.ttf - Upstream project:
https://github.com/googlefonts/noto-emoji - License: SIL Open Font License 1.1 (OFL)
Bitmap Compression Tool
Use the in-repo tool to convert an existing LVGL bitmap font (lv_font_conv output)
to LVGL compressed bitmap format (bitmap_format = 2):
./tools/compress_lvgl_bitmap_font.py path/to/generated_lvgl_font.c
The tool validates each glyph via encode/decode round-trip before writing.
Built-In Emoji Catalogue
The reviewed 324-item Emoji catalogue is not an external pack. Its source of
truth is tools/emoji_candidates_trailmate.json; the generated C++ table and
16px/2bpp binfont are compiled into the firmware. The catalogue is grouped for
Pager use into Common, Radio, Nav, Weather, Survive, Rescue, Camp, People, and
Animals.
After changing the manifest, regenerate both the charset and the embedded font from the repository root:
python tools/generate_builtin_emoji_data.py \
--manifest tools/emoji_candidates_trailmate.json \
--font tools/fonts/NotoEmoji-Regular.ttf \
--charset-output <temporary charset.txt>
python tools/generate_binfont_with_lv_font_conv.py \
--font tools/fonts/NotoEmoji-Regular.ttf \
--charset-file <temporary charset.txt> \
--output <temporary emoji.bin> \
--size 16 --bpp 2
python tools/generate_builtin_emoji_data.py \
--manifest tools/emoji_candidates_trailmate.json \
--font tools/fonts/NotoEmoji-Regular.ttf \
--binfont <temporary emoji.bin> \
--output modules/ui_shared/src/ui/widgets/text_candidate_builtin_emoji_data.h
The generator rejects duplicate candidates, category count mismatches, an
unexpected total, and codepoints unavailable in NotoEmoji-Regular.ttf.
External Pack Workflow
Simplified Chinese no longer ships as a compiled-in UI font. The repository now expects Chinese glyph coverage to be generated into external font packs.
The reference bundle lives under:
packs/zh-Hans
Typical flow:
- Refresh the ranked Pinyin glyph sources:
python tools/extract_pinyin_chars.py
- Generate the core pack subset:
python tools/build_locale_pack_charset.py --pack-root packs/zh-Hans --font-pack-id zh-hans-core
- Generate the extension pack subset:
python tools/build_locale_pack_charset.py --pack-root packs/zh-Hans --font-pack-id zh-hans-ext
- Generate T-Deck Pro
font.binfiles through the pack builder using:
-
font source for the T-Deck Pro pixel profile:
tools/fonts/unifont-17.0.05.bdf.gz -
glyph subsets:
packs/zh-Hans/fonts/tdeckpro-zh-hans-core/charset.txtpacks/zh-Hans/fonts/tdeckpro-zh-hans-ext/charset.txt
-
output format:
bin -
size:
16 -
bpp:
1For
.bdfinput the wrapper feeds the original BDF rows directly to the LVGL binary-font writer. It never converts the glyphs through TrueType, FreeType, antialiasing, or scaling.
- Copy the pack directories onto the SD card under
/trailmate/packs/....