How to assign different font size to sub text of label text

I want to assign different font size to different words(sub texts) of the label text .
For example, if the label text is “Good Morning” , I want to assign 20px font to the word “Good” and 30px to “Morning” using single label object. Is this possible ?


What MCU/Processor/Board and compiler are you using?

Simulator , visual studio , windows

What LVGL version are you using?


What do you want to achieve?

assign different font size to sub texts of the label text

What have you tried so far?

Read the whole documentation , didnt see any such examples. :slightly_frowning_face:

Code to reproduce


Thank you

No way. You can override Draw method and do it by yourself.
Or you can add child label objects for each word to subitem.

Thank you @spider_vc for the help

1 Like