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
It appears that the choice of anchor point for text positioning depends on the actual width of the text in pixels rather than the width of the glyphs. In general this is hard to notice, but it definitely causes issues with monospaced/fixed width fonts that are dynamically updated. For instance, consider a simple counter app, where the text of the current count is positioned with the following Layout:
When the rightmost character of the text updates from a wide character (e.g. 0) to a narrow character (e.g. 1) or vice versa, there is a noticeable horizontal shift in the rest of the characters on the left.
The text was updated successfully, but these errors were encountered:
However, wgpu_glyph doesn't contain any positioning/measurement logic. This logic lives in glyph-brush, a direct dependency.
A new glyph-brush version was released a couple of days ago, and I believe it may fix this. I will try to update the dependency this week. If it doesn't fix the problem, we should file an issue in glyph-brush.
It appears that the choice of anchor point for text positioning depends on the actual width of the text in pixels rather than the width of the glyphs. In general this is hard to notice, but it definitely causes issues with monospaced/fixed width fonts that are dynamically updated. For instance, consider a simple counter app, where the text of the current count is positioned with the following
Layout
:When the rightmost character of the text updates from a wide character (e.g.
0
) to a narrow character (e.g.1
) or vice versa, there is a noticeable horizontal shift in the rest of the characters on the left.The text was updated successfully, but these errors were encountered: