-
Notifications
You must be signed in to change notification settings - Fork 79
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
Force font size(width and height) for iconfont #90
Comments
Is the WiFi icon + text a single label in the example? |
no, split two objects (img + label) , I use example : Complex Menu. |
Event the Complex Menu example icon look really good, But I change icon to something "thin" icon for example "LV_SYMBOL_BLUETOOTH" which seems offset x : |
As you can see, I change the partly code:
and I success (but even though I think a group of iconfonts which in a 'n*n' piexl box center by user setting is really useful. That means I don't have to adjust every single icon padding one by one !) |
I think it should be solved in LVGL and not in the font converter. For v9 we will have more "image sizing options" which apply if the widget size of not the same as the mage source size. LVGL will be able to center, tile or zoom the image according to the widget size. In your case setting e.g. Until that I recommend this workaround in if(icon) {
lv_obj_t * wrapper = lv_obj_create(obj);
lv_obj_remove_style_all(wrapper);
lv_obj_set_size(wrapper, 50, LV_SIZE_CONTENT);
img = lv_img_create(wrapper);
lv_img_set_src(img, icon);
lv_obj_center(img);
} |
I have a problem about iconfont in a long time.
I use "lv_font_conv " which convert a “my_iconfont.c” file. And then try to modify ".c" file which have "offset x" and "offset y" for aligning icons to same column. But I try my best,you can see result below here :
So, I want to know how force font size instead of compact format
Thanks
The text was updated successfully, but these errors were encountered: