mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 14:03:01 +08: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>
|
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
||||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
|
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
|
||||||
public static string GetWeightString(Typeface typeface, FontWeight weight)
|
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>
|
/// <summary>
|
||||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
||||||
|
Loading…
Reference in New Issue
Block a user