1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:47:24 +08:00

Merge pull request #18664 from smoogipoo/font-matching-refactor

Match family string via GetFamilyString()
This commit is contained in:
Dean Herbert 2022-06-13 13:17:11 +09:00 committed by GitHub
commit 5b5caa88a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ namespace osu.Game.Graphics
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="family"/>.</returns>
public static string GetWeightString(string family, FontWeight weight)
{
if ((family == @"Torus" || family == @"Torus-Alternate") && weight == FontWeight.Medium)
if ((family == GetFamilyString(Typeface.Torus) || family == GetFamilyString(Typeface.TorusAlternate)) && weight == FontWeight.Medium)
// torus doesn't have a medium; fallback to regular.
weight = FontWeight.Regular;