osu-framework
osu-framework copied to clipboard
Disabling `UseFullGlyphHeight` does not trim top part of sprite text glyphs
Currently disabling the property would end up making the sprite text look unaligned instead:
UseFullGlyphHeight = true |
UseFullGlyphHeight = false |
|
|---|---|---|
| with margin | ![]() |
![]() |
| without margin | ![]() |
![]() |
As can be seen on the above screenshots, UseFullGlyphHeight = false does not trim the top part of the sprite text glyphs, causing them to look unaligned on UI components.
This property already works well on osu!-side's LegacySpriteTexts as they don't have extra padding on the top like normal fonts do.
Used code for reference:
AutoSizeAxes = Axes.Both;
InternalChildren = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
},
new SpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = FontUsage.Default.With(size: 25),
// Margin = new MarginPadding(0),
// Margin = new MarginPadding(5),
Colour = Color4.Black,
// UseFullGlyphHeight = false,
// UseFullGlyphHeight = true,
Text = someText,
}
};



