Underline position of custom font in SLS

What do you want to achieve?

for an imported font the UNDERLINE DECOR is not in the a good position, (it might be placed a little under the text) in SLS, i thought at first that it’s related to lvgl, but it seems to be seen like that just in SLS, and as i tried the same code in eclipse simulator it seems to be in good place.
by the way is it possible to change the position of underline decor in LVGL ?

Screenshot in SLS :

Screenshot in simulator eclipse :

image

Others

  • SquareLine Studio version: 1.3.2
  • Operating system: windows
  • Target hardware: eclipse simulator

Can you attach the Roboto font that you have used? So it produces different result when it’s converted with SLS and when it’s converted with the font converter manually?

In fonts the underline position is stored here (can be overwritten manually): https://github.com/lvgl/lvgl/blob/release/v8.3/src/font/lv_font_montserrat_8.c#L1440

Roboto-Regular.zip (84.1 KB)
it’s not just with roboto font, i tried it with other fonts.

screenshot above uses the code generated by sls (including font converted by SLS), and i see that in simulator it looks correct but not in SLS view , so i assume it’s something not going well in frontend (view) of SLS

I think the problem is that SLS is uses an older version of LVGL where the font.underline value was not considered during rendering. We will update LVGL in the next release and check if it solves the issue.

Which desktop OS do you use?

1 Like

I use Windows 10