mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix performance issues while loading fonts
This commit is contained in:
parent
8283c89614
commit
a104693f97
1 changed files with 4 additions and 1 deletions
|
|
@ -60,7 +60,10 @@ namespace Wox.Helper
|
|||
|
||||
public static FamilyTypeface ConvertFromInvariantStringsOrNormal(this FontFamily family, string style, string weight, string stretch)
|
||||
{
|
||||
return family.FamilyTypefaces.FirstOrDefault(o => o.Style == GetFontStyleFromInvariantStringOrNormal(style) && o.Weight == GetFontWeightFromInvariantStringOrNormal(weight) && o.Stretch == GetFontStretchFromInvariantStringOrNormal(stretch))
|
||||
var styleObj = GetFontStyleFromInvariantStringOrNormal(style);
|
||||
var weightObj = GetFontWeightFromInvariantStringOrNormal(weight);
|
||||
var stretchObj = GetFontStretchFromInvariantStringOrNormal(stretch);
|
||||
return family.FamilyTypefaces.FirstOrDefault(o => o.Style == styleObj && o.Weight == weightObj && o.Stretch == stretchObj)
|
||||
?? family.ChooseRegularFamilyTypeface();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue