Files
tactility/Modules/lvgl-module
Adolfo Reyna ff3eeacaf7 feat(lvgl-module): complete canvas API export for GameBoy emulator
- canvas: add missing getters/setters (get_buf, get_image, get_px, get_draw_buf,
  set_palette, copy_buf, init_layer, finish_layer, buf_size)
- draw_buf: export create/destroy/init/dup/copy/goto/width_to_stride/align/palette/from_image/to_image
- draw layer: create + alloc_buf
- image: scale/rotation/pivot/offset for GB integer upscaling
- style: transform_scale/pivot for fallback path

Enables ELF apps to use full LVGL9 canvas docs API:
- 160x144 raw buffer + lv_image_set_scale 2x/3x
- layer init/finish for direct draw calls
- palette for indexed GB modes

Test: GameBoy app builds clean (0 missing symbols) vs 5.5.2 SDK
Fixes missing symbol errors that previously required commented-out scaling workaround
2026-07-20 00:21:01 -04:00
..
2026-06-03 23:10:37 +02:00
2026-06-03 23:10:37 +02:00

lvgl-module

This module manages the lifecycle of the LVGL library within the Tactility ecosystem.

What the library does

The lvgl-module provides:

  • Lifecycle Management: Handles initialization and termination of the LVGL library.
  • Task Management: Manages the LVGL main loop task.
  • Thread-Safety: Provides mutex-based locking mechanisms (lvgl_lock, lvgl_unlock) to ensure safe access to LVGL APIs from multiple tasks.
  • Font Access: Provides a unified interface to access pre-configured text and icon fonts.

Different types of fonts

The module supports two main categories of fonts:

Text Fonts

Standard text rendering uses the Montserrat font. Three sizes are pre-configured:

  • FONT_SIZE_SMALL
  • FONT_SIZE_DEFAULT
  • FONT_SIZE_LARGE

Icon Fonts

Icons are provided by the Material Symbols font, divided into three usage-specific sets:

  • Statusbar Icons: Optimized for the system status bar.
  • Launcher Icons: Sized for application launchers.
  • Shared Icons: General purpose icons used across the system.

How to update the fonts

Font sizes and symbols are configurable:

  • On ESP32 (IDF): Sizes can be updated via menuconfig or by editing sdkconfig. Look for CONFIG_TT_LVGL_FONT_SIZE_* and CONFIG_TT_LVGL_*_ICON_SIZE parameters.
  • On Simulator/POSIX: Default sizes are defined in Modules/lvgl-module/CMakeLists.txt.

If you change an icon font size, ensure that a corresponding C file exists in source-fonts/ (e.g., material_symbols_shared_24.c). These files are generated from TTF/OTF fonts using the LVGL font converter.

License

This module is licensed under the Apache v2.0 license.