Browse Source
Do not embolden a typeface that already has a higher weight than the requested (#16538)
pull/16568/head
Benedikt Stebner
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
src/Avalonia.Base/Media/Fonts/EmbeddedFontCollection.cs
-
src/Avalonia.Base/Media/Fonts/SystemFontCollection.cs
|
|
|
@ -81,7 +81,7 @@ namespace Avalonia.Media.Fonts |
|
|
|
fontSimulations |= FontSimulations.Oblique; |
|
|
|
} |
|
|
|
|
|
|
|
if ((int)weight >= 600 && glyphTypeface2.Weight != weight) |
|
|
|
if ((int)weight >= 600 && glyphTypeface2.Weight < weight) |
|
|
|
{ |
|
|
|
fontSimulations |= FontSimulations.Bold; |
|
|
|
} |
|
|
|
|
|
|
|
@ -113,7 +113,7 @@ namespace Avalonia.Media.Fonts |
|
|
|
fontSimulations |= FontSimulations.Oblique; |
|
|
|
} |
|
|
|
|
|
|
|
if ((int)weight >= 600 && glyphTypeface2.Weight != weight) |
|
|
|
if ((int)weight >= 600 && glyphTypeface2.Weight < weight) |
|
|
|
{ |
|
|
|
fontSimulations |= FontSimulations.Bold; |
|
|
|
} |
|
|
|
|