You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried slint for the first time. In general I judge the usability of a GUI framework based on how well it handles text, and while I noticed a few problems, it seems like font fallback and some IME support is there, which surprised me positively. Nevertheless one of the most common issues with text is unclear rendering. Turns out that it's particularly bad here in slint with the default femtovg renderer.
I however already figured out the problem. It turns out that the text is not aligned to the pixel grid. So when femtovg blits the glyphs from its glyph atlas, it uses a bilinear filter. So if the text is off by half a pixel you essentially get two source pixel averaged together per target pixel, meaning you effectively reduce the resolution of the text by half.
The left is the default text rendering with femtovg and the right is me having patched femtovg to use nearest neighbor for their glyph atlas (you can do so via the ImageFlagshere).
Now I don't know if that's the actual solution, but it at least worked around the problem for the most part. There's still some rare edge case where the two triangles making up each glyph end up blitting the texture off by 1 pixel respectively.
The text was updated successfully, but these errors were encountered:
I just tried slint for the first time. In general I judge the usability of a GUI framework based on how well it handles text, and while I noticed a few problems, it seems like font fallback and some IME support is there, which surprised me positively. Nevertheless one of the most common issues with text is unclear rendering. Turns out that it's particularly bad here in slint with the default femtovg renderer.
I however already figured out the problem. It turns out that the text is not aligned to the pixel grid. So when femtovg blits the glyphs from its glyph atlas, it uses a bilinear filter. So if the text is off by half a pixel you essentially get two source pixel averaged together per target pixel, meaning you effectively reduce the resolution of the text by half.
The left is the default text rendering with femtovg and the right is me having patched femtovg to use nearest neighbor for their glyph atlas (you can do so via the
ImageFlags
here).Now I don't know if that's the actual solution, but it at least worked around the problem for the most part. There's still some rare edge case where the two triangles making up each glyph end up blitting the texture off by 1 pixel respectively.
The text was updated successfully, but these errors were encountered: