When I create a custom font with Noto Sans and Material Symbols, the icons are smaller than intended and not centered. It’s possible that the centering issue is merely a consequence of the sizing issue.
The attached zip file contains font_gen.sh which generates the fonts. It also has a slightly modified built_in_font_gen.py
To run it, you have to download the .ttf file above and rename it to MaterialSymbolsRounded.ttf font issue.zip (349.7 KB)
Update: I also tested the older font (Material Icons instead of Material Style) and it has the same issue:
Layout debug rendering:
“dump” font example. You’ll also find that it’s 12px high:
@kisvegabor Should I open an issue for this at lv_font_conv ?
I’m willing to put a bounty on it to get a fix.
Sidenote: If it can be fixed, would you consider making MaterialSymbols the standard for icons in LVGL? It would give users a lot more freedom in adding more icons as AwesomeFont charges 120$/year + tax and the Pro icons are likely not allowed in GPL-licensed projects (“distributing” is not allowed and it’s not clear what that means).
Thanks for sharing this and for putting a bounty on it! I’d start by checking how LVGL handles font metrics, especially baseline alignment and scaling. Sometimes, fonts don’t render as expected due to rounding issues or differences in how glyphs are measured. A quick fix could be tweaking the ascent/descent values in lv_font_conv or adjusting the box height manually. If that doesn’t work, I’d try converting the icons with a different tool first to see if the issue persists