Skip to content

Conversation

@cnjhb
Copy link
Contributor

@cnjhb cnjhb commented Mar 20, 2025

The cache for variable images is recognized based on a pointer to the variable, but with imgfont it is always necessary to refer the contents of the variable image to the path field of imgfont_dsc_t,
which means that even though the image has changed, the cache has not. This results in later letters displaying the image of the first letter.

Notes

@lvgl-bot
Copy link

lvgl-bot commented Apr 7, 2025

We need some feedback on this pull request.

Now we mark this as "Abandoned" because there was no activity here for 14 days.

Remove the "Abandoned" label or comment else this will be closed in 7 days.

@liamHowatt
Copy link
Member

The v8.4 CI has been fixed. Please rebase so the fixed CI can run.

@liamHowatt liamHowatt reopened this May 14, 2025
@cnjhb
Copy link
Contributor Author

cnjhb commented May 14, 2025

The v8.4 CI has been fixed. Please rebase so the fixed CI can run.

thank you

Copy link
Member

@liamHowatt liamHowatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thank you.

Confirmed with:

cp docs/favicon.png examples/assets/emoji/F601.png
diff --git a/examples/others/imgfont/lv_example_imgfont_1.c b/examples/others/imgfont/lv_example_imgfont_1.c
index e98393284..bcff1f673 100644
--- a/examples/others/imgfont/lv_example_imgfont_1.c
+++ b/examples/others/imgfont/lv_example_imgfont_1.c
@@ -37,7 +37,7 @@ void lv_example_imgfont_1(void)
     imgfont->fallback = LV_FONT_DEFAULT;
 
     lv_obj_t * label1 = lv_label_create(lv_scr_act());
-    lv_label_set_text(label1, "12\uF600\uF617AB");
+    lv_label_set_text(label1, "12\uF600\uF617\uF601AB");
     lv_obj_set_style_text_font(label1, imgfont, LV_PART_MAIN);
     lv_obj_center(label1);
 }

Before:

image

After:
image

Copy link
Collaborator

@AndreCostaaa AndreCostaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🚀

@liamHowatt liamHowatt merged commit e8b95b3 into lvgl:release/v8.4 May 16, 2025
28 checks passed
Moonlit-1 pushed a commit to espressif2022/lvgl that referenced this pull request May 21, 2025
Co-authored-by: liamHowatt <liamjmh0@gmail.com>

ci(docs): fix python version (lvgl#8247)

fix(imgfont):for img cache (lvgl#7963)

feat: add font loader and glyph bitmap read API with debug logs

change python version
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.

4 participants