mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Merge pull request #10556 from peppy/fix-legacy-score-display-fixed-width
Allow legacy text to display fixed width correctly
This commit is contained in:
commit
d1075cabbd
@ -12,12 +12,16 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
private readonly LegacyGlyphStore glyphStore;
|
private readonly LegacyGlyphStore glyphStore;
|
||||||
|
|
||||||
|
protected override char FixedWidthReferenceCharacter => '5';
|
||||||
|
|
||||||
|
protected override char[] FixedWidthExcludeCharacters => new[] { ',', '.', '%', 'x' };
|
||||||
|
|
||||||
public LegacySpriteText(ISkin skin, string font = "score")
|
public LegacySpriteText(ISkin skin, string font = "score")
|
||||||
{
|
{
|
||||||
Shadow = false;
|
Shadow = false;
|
||||||
UseFullGlyphHeight = false;
|
UseFullGlyphHeight = false;
|
||||||
|
|
||||||
Font = new FontUsage(font, 1);
|
Font = new FontUsage(font, 1, fixedWidth: true);
|
||||||
glyphStore = new LegacyGlyphStore(skin);
|
glyphStore = new LegacyGlyphStore(skin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user