From a40f36316ba1be3762d847b8827cc22f3060f318 Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 11 Jun 2026 04:17:40 -0600 Subject: [PATCH] Revert "dashboard: fix icon font descriptor for lvgl v8" This reverts commit b0d52993e983c6f87426d511039d3fddfdc7ce6a. --- firmware/esp32-s3-dashboard/md_icons.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/firmware/esp32-s3-dashboard/md_icons.h b/firmware/esp32-s3-dashboard/md_icons.h index 6cce3e9..4959abd 100644 --- a/firmware/esp32-s3-dashboard/md_icons.h +++ b/firmware/esp32-s3-dashboard/md_icons.h @@ -18,6 +18,8 @@ #include "lvgl/lvgl.h" #endif + + #ifndef MD_ICONS #define MD_ICONS 1 #endif @@ -288,6 +290,7 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { 0x7d, 0x20, 0x7, 0xff, 0x24 }; + /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -308,6 +311,8 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { * CHARACTER MAPPING *--------------------*/ + + /*Collect the unicode lists and glyph_id offsets*/ static const lv_font_fmt_txt_cmap_t cmaps[] = { @@ -317,6 +322,8 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = } }; + + /*-------------------- * ALL CUSTOM DATA *--------------------*/ @@ -346,6 +353,8 @@ static lv_font_fmt_txt_dsc_t font_dsc = { }; + + /*----------------- * PUBLIC FONT *----------------*/ @@ -356,17 +365,25 @@ const lv_font_t md_icons = { #else lv_font_t md_icons = { #endif - .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 41, /*The maximum line height required by the font*/ .base_line = 3, /*Baseline measured from the bottom of the line*/ #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, #endif #if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = 0, + .underline_thickness = 0, #endif + .static_bitmap = 0, .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ #if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9 + .fallback = NULL, #endif .user_data = NULL, }; + + #endif /*#if MD_ICONS*/