mirror of
https://github.com/ppy/osu
synced 2024-12-25 16:22:23 +00:00
Add medium -> regular fallback for torus
This commit is contained in:
parent
288470c313
commit
c45f9cafd4
@ -59,7 +59,13 @@ namespace osu.Game.Graphics
|
||||
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
|
||||
public static string GetWeightString(Typeface typeface, FontWeight weight)
|
||||
=> GetWeightString(GetFamilyString(typeface), weight);
|
||||
{
|
||||
if (typeface == Typeface.Torus && weight == FontWeight.Medium)
|
||||
// torus doesn't have a medium; fallback to regular.
|
||||
weight = FontWeight.Regular;
|
||||
|
||||
return GetWeightString(GetFamilyString(typeface), weight);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
||||
|
Loading…
Reference in New Issue
Block a user