Skip to content

lvgl: setFontResolver + lvgl.SYMBOL; LuaModule::state() - #47

Merged
genmon merged 3 commits into
mainfrom
genmon/lvgl-font-resolver
Sep 10, 2026
Merged

genmon merged 3 commits into
mainfrom
genmon/lvgl-font-resolver

Conversation

@genmon

@genmon genmon commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

LVGL apps could only use the families compiled into lv_conf.h. luavgl already has a per-state font extension for anything else; nothing installed it, and only the sandbox holds the state.

  • LvglModule::setFontResolver(fn): installed via luavgl_set_font_extension on every registerModule (fresh state per app). Built-ins first, then the resolver, then the next name in a comma list.
  • lvgl.SYMBOL.<NAME>: LV_SYMBOL_* as Lua strings — the icon glyphs were unreachable from Lua.
  • LuaModule::state(): the state a module table is being built in (test in test_lua_module).

Unit suite green; m5stick-lvgl example builds.

🤖 Generated with Claude Code

…tup, not per app

registerModule runs once when the sandbox creates its Lua state
(Sandbox::initialize, called from the idempotent setup()); loadApp never
recreates the state or re-runs registerModule. Fixes comments in
ResidentLvglModule.h, ResidentLuaModule.h, docs/api.md and
docs/changelog.md that said the resolver/state was fresh per app.
@genmon
genmon merged commit e25f4bd into main Sep 10, 2026
4 checks passed
@genmon
genmon deleted the genmon/lvgl-font-resolver branch September 10, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant