-
-
Notifications
You must be signed in to change notification settings - Fork 4k
fix(imgfont):for img cache #7963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
|
The v8.4 CI has been fixed. Please rebase so the fixed CI can run. |
thank you |
liamHowatt
left a comment
There was a problem hiding this 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.pngdiff --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:
AndreCostaaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🚀


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
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle v3.4.12needs to installed by runningcd scripts; ./install_astyle.sh) and follow the Code Conventions.