1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 05:52:56 +08:00

Better align fonts to weights

This commit is contained in:
Dean Herbert 2020-03-04 11:21:37 +09:00
parent db56fb5759
commit 4294ed4b64
2 changed files with 31 additions and 8 deletions

View File

@ -17,7 +17,7 @@ namespace osu.Game.Graphics
/// </summary> /// </summary>
public static FontUsage Default => GetFont(); public static FontUsage Default => GetFont();
public static FontUsage Numeric => GetFont(Typeface.Venera); public static FontUsage Numeric => GetFont(Typeface.Venera, weight: FontWeight.Bold);
public static FontUsage Torus => GetFont(Typeface.Torus, weight: FontWeight.Regular); public static FontUsage Torus => GetFont(Typeface.Torus, weight: FontWeight.Regular);
@ -103,11 +103,34 @@ namespace osu.Game.Graphics
public enum FontWeight public enum FontWeight
{ {
Light, /// <summary>
Regular, /// equivalent to weight 300
Medium, /// </summary>
SemiBold, Light = 300,
Bold,
Black /// <summary>
/// equivalent to weight 400
/// </summary>
Regular = 400,
/// <summary>
/// equivalent to weight 500
/// </summary>
Medium = 500,
/// <summary>
/// equivalent to weight 600
/// </summary>
SemiBold = 600,
/// <summary>
/// equivalent to weight 700
/// </summary>
Bold = 700,
/// <summary>
/// equivalent to weight 900
/// </summary>
Black = 900
} }
} }

View File

@ -58,7 +58,7 @@ namespace osu.Game.Online.Leaderboards
Spacing = new Vector2(-3, 0), Spacing = new Vector2(-3, 0),
Padding = new MarginPadding { Top = 5 }, Padding = new MarginPadding { Top = 5 },
Colour = getRankNameColour(), Colour = getRankNameColour(),
Font = OsuFont.GetFont(Typeface.Venera, 25), Font = OsuFont.Numeric.With(size: 25),
Text = getRankName(), Text = getRankName(),
ShadowColour = Color4.Black.Opacity(0.3f), ShadowColour = Color4.Black.Opacity(0.3f),
ShadowOffset = new Vector2(0, 0.08f), ShadowOffset = new Vector2(0, 0.08f),