Closed hecrj closed 5 years ago
Issue reproduced and reported: https://github.com/alexheretic/glyph-brush/issues/68
It turns out that pixel_bounds
is not compatible with Section::bounds
. Totally my fault! :sweat_smile: 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! :tada:
So we just need to wait until a new glyph_brush
release.
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.