I use the LVGL library version 8.3 to render graphics on the display. I have a label that has a fixed size (width and height). I need to solve the problem of automatically adjusting the font size according to the text that is inserted in the label. For example, if there is only one word below the text, the largest possible font will be used. If the text would be outside the size of the label, the font should be changed to one where the text is inside the label. Is there such a thing in LVGL? Or can anyone advise how to solve this?
Hi mbrazdil, you can’t adjust the font size by using lvgl 8.3 freetype api, but lvgl 9 tinyttf api could satisfy your requirement: Tiny TTF font engine — LVGL documentation. Of course, if you must work on lvgl v8.3 to develop your app, you need to research freetype library to develop lvgl freetype font api.