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:
Dan Balasescu 2020-10-19 19:50:30 +09:00 committed by GitHub
commit d1075cabbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,12 +12,16 @@ namespace osu.Game.Skinning
{
private readonly LegacyGlyphStore glyphStore;
protected override char FixedWidthReferenceCharacter => '5';
protected override char[] FixedWidthExcludeCharacters => new[] { ',', '.', '%', 'x' };
public LegacySpriteText(ISkin skin, string font = "score")
{
Shadow = false;
UseFullGlyphHeight = false;
Font = new FontUsage(font, 1);
Font = new FontUsage(font, 1, fixedWidth: true);
glyphStore = new LegacyGlyphStore(skin);
}