Elementa
Elementa copied to clipboard
MSDF FontRenderer misaligned text height
Describe the bug
Text rendered with the MSDF FontRenderer is higher than it should be, outside the bounding box of the constraints.
To Reproduce Steps to reproduce the behavior:
- Render any
UITextwith fontProvider set to one that uses MSDFFontRenderer. - Having an
OutlineEffectmakes the misalignment easier to see.
Expected behavior Text should be rendered inside the bounding box of the constraints.
Screenshots
Sample text rendered using DefaultFonts.ELEMENTA_MINECRAFT_FONT_RENDERER with CenterConstraint() and an OutlineEffect().
Same text and code, but using DefaultFonts.VANILLA_FONT_RENDERER instead.
Additional context
Only affects fonts created with FontRenderer. VanillaFontRenderer and BasicFontRenderer are rendered correctly