We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7852ebf commit 169d086Copy full SHA for 169d086
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FamilyCollection.cs
@@ -499,10 +499,7 @@ private static Text.TextInterface.Font GetFontFromFamily(Text.TextInterface.Font
499
foreach (KeyValuePair<CultureInfo, string> name in font.FaceNames)
500
{
501
string currentFontName = name.Value.ToUpper(CultureInfo.InvariantCulture);
502
- if (!faces.ContainsKey(currentFontName))
503
- {
504
- faces.Add(currentFontName, font);
505
- }
+ faces.TryAdd(currentFontName, font);
506
}
507
508
0 commit comments