Files
trail-mate/tools/fonts
liu weikai 7adf727950 feat: add walkie monitor topbar indicators
Add LoRa/FSK topbar modulation badges and monitor status handling for walkie talkie mode.

Keep built-in text candidates and small symbol/emoji font baselines aligned with localization specs, and remove the legacy compiled-in CJK font path.
2026-06-19 21:04:40 +08:00
..

Font Assets

This directory stores source vector fonts used to generate Trail Mate font assets.

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

  • 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 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.

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:

  1. Refresh the ranked Pinyin glyph sources:
python tools/extract_pinyin_chars.py
  1. Generate the core pack subset:
python tools/build_locale_pack_charset.py --pack-root packs/zh-Hans --font-pack-id zh-hans-core
  1. Generate the extension pack subset:
python tools/build_locale_pack_charset.py --pack-root packs/zh-Hans --font-pack-id zh-hans-ext
  1. Generate font.bin files with lv_font_conv using:
  • font source: tools/fonts/NotoSansCJKsc-Regular.otf
  • glyph subsets:
    • packs/zh-Hans/fonts/zh-hans-core/charset.txt
    • packs/zh-Hans/fonts/zh-hans-ext/charset.txt
  • output format: bin
  • size: 16
  • bpp: 2
  1. Copy the pack directories onto the SD card under /trailmate/packs/....