feat(rlcd): runtime font size selector in Settings->Display

- device.properties bump default to 20
- lvgl_fonts add runtime override API (g_runtime_font_size + externs for all Montserrat sizes)
- DisplaySettings add fontSize field persisted in properties
- Display app adds Font size dropdown 14-28 applying immediately
- Lvgl.cpp applies saved runtime font on boot
- device.py new bucket <=20 includes all fonts for runtime switching (~150KB)

Co-authored-by: internal-model
This commit is contained in:
Adolfo Reyna
2026-07-18 15:10:42 -04:00
parent 12035f2f39
commit e29e9b4a66
8 changed files with 177 additions and 18 deletions
+19
View File
@@ -304,6 +304,25 @@ def write_lvgl_variables(output_file, device_properties: dict):
output_file.write("CONFIG_TT_LVGL_STATUSBAR_ICON_SIZE=20\n")
output_file.write("CONFIG_TT_LVGL_LAUNCHER_ICON_SIZE=48\n")
output_file.write("CONFIG_TT_LVGL_SHARED_ICON_SIZE=20\n")
elif font_height <= 20:
# Exact +~14% over 18 bucket for RLCD - requested "increase another 15%"
output_file.write("CONFIG_LV_FONT_MONTSERRAT_16=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_20=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_26=y\n")
output_file.write("CONFIG_LV_FONT_DEFAULT_MONTSERRAT_20=y\n")
output_file.write("CONFIG_TT_LVGL_FONT_SIZE_SMALL=16\n")
output_file.write("CONFIG_TT_LVGL_FONT_SIZE_DEFAULT=20\n")
output_file.write("CONFIG_TT_LVGL_FONT_SIZE_LARGE=26\n")
output_file.write("CONFIG_TT_LVGL_STATUSBAR_ICON_SIZE=20\n")
output_file.write("CONFIG_TT_LVGL_LAUNCHER_ICON_SIZE=48\n")
output_file.write("CONFIG_TT_LVGL_SHARED_ICON_SIZE=20\n")
# For runtime font size setting on RLCD - include all sizes for switching
# This adds ~150KB to binary but allows runtime font choice 14/18/20/24/28
output_file.write("CONFIG_LV_FONT_MONTSERRAT_14=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_18=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_24=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_28=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_30=y\n")
elif font_height <= 24:
output_file.write("CONFIG_LV_FONT_MONTSERRAT_18=y\n")
output_file.write("CONFIG_LV_FONT_MONTSERRAT_24=y\n")