Hi,
How can I add new symbols please ?
I tried things based on this documentation but I’m not a C expert and beginning with micropython and lvgl.
What’s the full process for adding a fontawsome symbol in micropython please ?
Thanks
Hi,
How can I add new symbols please ?
I tried things based on this documentation but I’m not a C expert and beginning with micropython and lvgl.
What’s the full process for adding a fontawsome symbol in micropython please ?
Thanks
You have a few options:
Thank’s amigron.
I’m working from this stm32f469 port of LVGL. It’s not the last LVGL version but there is the only one port for this board that I have found. (I haven’t the skill to port latest LVGL at this time :-/)
I would prefer to use the second approach with the C file.
I do that:
usermods/udisplay_f469/fonts
folder.LV_FONT_DECLARE(custom_symbols_16)
into usermods/udisplay_f469/lv_conf.h
SRC_USERMOD += $(DISPLAY_MOD_DIR)/fonts/custom_symbols_16.c\ into
usermods/udisplay_f469/micropython.mk` fileTrying to use style.text.font = lv.custom_symbols_16
into my code but obtain this error: 'module' object has no attribute 'custom_symbols_16'
Something escapes me but I can’t see what.
I also thought of adding symbols in the existing source code of the roboto font.
At first glance it seemed possible but it’s obviously not as simple as copying / pasting pieces of code from the file generated by the converter into the roboto source, especially in the “glyph description” section
Do you have any advice for me please ?
It’s very old.
Looking at their files, they froze Micropython bindings on Jan 2021, nearly two years ago, and didn’t update since.
You can consider taking their display driver and using it with newer lv_micropython (but only if their license agreement allows this)
You should add something like:
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_custom_symbols_16)
(note the lv_ prefix!)
Then the font should be available as lv.custom_symbols_16
Thank you for your advice. I will do some tests in this direction.
I thought about trying to port it in v8 but I still have to learn I think.
The project is under MIT license so no worries for porting. I keep this idea into my head