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
The line_w field is less than the actual icon glyph when calling buffer.layout_runs() whenever the line contains a single icon glyph. Actual rendering is correct. However, this becomes an issue when rendering to a surface with dimensions based on the measured layout size, since the glyph gets cut off and ends up looking like this:
The behaviour occurs with any of the several icons that I've tried. The screenshot above was taken from my own project, however the same issue can be observed in Iced when using the WGPU renderer (doesn't happen with the tiny-skia renderer since the glyphs are being rendered directly to the window surface which is much larger):
If it matters, I'm using the icons through a Nerd font, but Iced and the editor-libcosmic example don't afaik.
It's also possible to see that the cursor is also placed incorrectly in the editor-libcosmic example:
Interestingly, I noticed the exact same behaviour in both Nano and Sublime 4. So my questions are:
Is this a bug or it's how "things are supposed to work" when using a non-monospaced font.
The
line_w
field is less than the actual icon glyph when callingbuffer.layout_runs()
whenever the line contains a single icon glyph. Actual rendering is correct. However, this becomes an issue when rendering to a surface with dimensions based on the measured layout size, since the glyph gets cut off and ends up looking like this:The behaviour occurs with any of the several icons that I've tried. The screenshot above was taken from my own project, however the same issue can be observed in Iced when using the WGPU renderer (doesn't happen with the tiny-skia renderer since the glyphs are being rendered directly to the window surface which is much larger):
If it matters, I'm using the icons through a Nerd font, but Iced and the
editor-libcosmic
example don't afaik.It's also possible to see that the cursor is also placed incorrectly in the
editor-libcosmic
example:Interestingly, I noticed the exact same behaviour in both Nano and Sublime 4. So my questions are:
The text was updated successfully, but these errors were encountered: