Browse Source

Always use the matched typeface's weight, style and stretch (#16489)

pull/16539/head
Benedikt Stebner 2 years ago
committed by GitHub
parent
commit
0b9fac7a7b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/Skia/Avalonia.Skia/FontManagerImpl.cs

2
src/Skia/Avalonia.Skia/FontManagerImpl.cs

@ -62,7 +62,7 @@ namespace Avalonia.Skia
if (skTypeface != null)
{
fontKey = new Typeface(skTypeface.FamilyName, fontStyle, fontWeight, fontStretch);
fontKey = new Typeface(skTypeface.FamilyName, (FontStyle)skTypeface.FontStyle.Slant, (FontWeight)skTypeface.FontStyle.Weight, (FontStretch)skTypeface.FontStyle.Width);
return true;
}

Loading…
Cancel
Save