I wanted to know if there is a possibility to add a custom text shaping engine to LVGL? I am thinking of something like HarfBuzz or Monotype WorldType Shaper. Yes it would, additionally to a font engine like FreeType, add a lot of overhead, but I can imagine scenario where that might be desired and useful. As I understand, there is currently a custom LVGL text shaper in the background and also a bidi handler.
Would there be a benefit to using a more advanced text shaping engine? Would it be possible to make a generic interface, a bit like the font engine interface, where you could plug in the different text shapers?
That is very cool to hear! That would elevate LVGL above emWin and a huge step towards Qt for MCU in terms of text rendering capability.
What would you expect in terms of development time for this feature? Are we talking a few days, weeks or even months? Just to get a feeling on how involved this might be
The current text shaping algorithm is tightly integrated with LVGL’s code. To phrase it in a more honest way, we haven’t considered that it should be a modular and abstract thing and… yeah… it looks like that…
To estimate the required work hours, I’d say it’s 1 week of work for someone who knows LVGL, but to be realistic while we add unit tests, docs, fixes, etc, it will be 2 weeks.
Absolutely! From what I’ve seen you have more than enough work in your v9.0 backlog This feature might also fit into a minor release with a bit of careful API design, so there is no need to shoehorn this into v9.0
I think text shaping is the most fundamental work in most UI frameworks. Please bring up the schedule
Or open an issue on the github. Starting from now on, discussing the design.
We used skia which used for all Android devices and Chrome, flutter… there is an good design in skia we can learn from it. BIDI is also an important part. The current design of LVGL is different from Windows, Android, and IOS.
Please keep in mind that the goal of LVGL is quite different to something like Windows, Android or iOS. It sure would be cool to have as much as you can from these experiences, but there will have to be sacrifices in some form.
I also think a Github issue would be a good start to start the discussion, but keep in mind that there are more pressing things than a new text engine for version 9, which should be coming out at the end of this year. But there is always the possibility to do it yourself. If you provide @kisvegabor the solution on a platter, he will probably accept it I would probably also provide feedback or even do some coding myself, if I find the time.
First on the todo list (which should be in a Github issue) would certainly be to analyze the current text rendering and modularize it somehow. Then think up an interface and what is part of it and so on…
I also found two interesting links that are worth reading for anyone interested in this topic and to keep the language precise