Different text decors and fonts in one text area / label

What do you want to achieve?

I want to use different text decors and fonts in one text are.

Do you see alternative options and workaround to achieve it?

Using many labels / text areas.

Mention some use cases

Maybe we could write something like this in the text area and SLS could generate the corresponding code:
<.underline><.font montserrat 30>Lorem ipsum</font montserrat 30></underline>

<.font montserrat 22>dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, <.strikethrough>sed </strikethrough>diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</font montserrat 22>

In LVGL we have the lv_span widget but it’s not available in SLS yet.

You can create a panel widget as a placeholder and after calling ui_init() you can create a span widget manually on it.

1 Like

Any plans to add lv_span directly? It would be very useful expecially in designs that need to use superscripts/suffix text - without having to add separate sized text labels with position adjustments to achieve similar.

We have plans for the span widget because LVGL 9 has no support for text ‘recolor’.