I’m new to lvgl. From my limited experience, I found that a widget (part) can only be assigned a single font at a time, wich is inconvenient and cause the need to duplicate font for, such as symbols, to multiple font files. This is even more serious when using large font charset (CJK). Is there a way or plan to support multiple fonts? This way it can search from a list of fonts until find one match.
Thanks for you great work.
With the font converter, you can add multiple font files into a C file.
Thanks for the reply, and, for your great work.
Yes we can add multiple font files and select glyphs from them to merge into one lvgl font c file, and that is what I did exactly. But my question (or wish) is that: if I can use several fonts, try to find glyph from them sequentially until find the first match, or finally fail? I think maybe this is the “ordinary” way?
I think the root of the problem is that we store fonts with a given size and not fonts that can be rendered at any size. Therefore you needed to add font’s like this:
font2_20px. But nothing prevents you from using fonts of different sizes. Or even different fonts with the same size can have different line-height and it makes it very difficult for LVGL to calculate the actual “global” line height to know how tall a label really is.
Anyway, I agree that this more ordinary way would be better. I’ll keep it in mind and think about it.
As a reminder, I moved this topic to the Feature requests category.
Thank you for the reply. There are many things need to be compomised I think. Maybe you
can move a minor step foward by doing that fonts with same size can be used together. This will be good enough for most of the case. At least good enough for me .
Unfortunately, different front with the same height have different line heights.
Á letter with 30px Monsterrat has 27 px line height, in 30px DejaVu it has 28 px line height.
Just because the fonts are different.