Closed Harry282 closed 11 months ago
Describe the bug Text rendered with the MSDF FontRenderer is higher than it should be, outside the bounding box of the constraints.
FontRenderer
To Reproduce Steps to reproduce the behavior:
UIText
OutlineEffect
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().
DefaultFonts.ELEMENTA_MINECRAFT_FONT_RENDERER
CenterConstraint()
OutlineEffect()
Same text and code, but using DefaultFonts.VANILLA_FONT_RENDERER instead.
DefaultFonts.VANILLA_FONT_RENDERER
Additional context Only affects fonts created with FontRenderer. VanillaFontRenderer and BasicFontRenderer are rendered correctly
VanillaFontRenderer
BasicFontRenderer
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:
UIText
with fontProvider set to one that uses MSDFFontRenderer
.OutlineEffect
makes 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
withCenterConstraint()
and anOutlineEffect()
.Same text and code, but using
DefaultFonts.VANILLA_FONT_RENDERER
instead.Additional context Only affects fonts created with
FontRenderer
.VanillaFontRenderer
andBasicFontRenderer
are rendered correctly