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 turns out that pixel_bounds is not compatible with Section::bounds. Totally my fault! 😅 The former are the conservative pixel boundaries for the Section, the latter are the bounds available for the text layout. While these may seem like the same thing, they are not (fonts are complicated!). I suspected something like that could be the issue.
We need a GlyphBrush::layout_bounds method. The glyph_brush author has already a working version! 🎉
So we just need to wait until a new glyph_brush release.
hecrj
changed the title
Font::measure seems to return wrong valuesFont::measure returns wrong values
Jun 13, 2019
I found this issue when working on #35.
Right now, the UI renderer applies a correction when measuring
Text
widgets. This is a dirtyfix and it probably doesn't work well with different fonts.Here is what happens if we do not apply the correction with Inconsolata Regular:
I think
GlyphBrush::pixel_bounds
is not returning a correct value. We should probably investigate why and file an issue/PR in theglyph-brush
repo.The text was updated successfully, but these errors were encountered: