mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-03 19:39:07 +08:00
Fix a bug with family typefaces
This commit is contained in:
parent
cf7ae90097
commit
7094675d5e
@ -55,7 +55,7 @@ namespace Wox.Helper
|
||||
return Math.Abs(o.Stretch.ToOpenTypeStretch() - FontStretches.Normal.ToOpenTypeStretch()) * 100 +
|
||||
Math.Abs(o.Weight.ToOpenTypeWeight() - FontWeights.Normal.ToOpenTypeWeight()) +
|
||||
(o.Style == FontStyles.Normal ? 0 : o.Style == FontStyles.Oblique ? 1 : 2) * 1000;
|
||||
}).FirstOrDefault();
|
||||
}).FirstOrDefault() ?? family.FamilyTypefaces.FirstOrDefault();
|
||||
}
|
||||
|
||||
public static FamilyTypeface ConvertFromInvariantStringsOrNormal(this FontFamily family, string style, string weight, string stretch)
|
||||
|
Loading…
Reference in New Issue
Block a user