Skip to content

Commit

Permalink
fix: Fix NRE in FontDetailsCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Jun 25, 2024
1 parent e43bbeb commit 80a87a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private static FontDetails GetFontInternal(

SKTypeface GetDefaultTypeFace()
{
// if Segoe UI is not found, it will automatically return a system default
return SKTypeface.FromFamilyName(FeatureConfiguration.Font.DefaultTextFontFamily, skWeight, skWidth, skSlant);
return SKTypeface.FromFamilyName(FeatureConfiguration.Font.DefaultTextFontFamily, skWeight, skWidth, skSlant)
?? SKTypeface.FromFamilyName(null, skWeight, skWidth, skSlant);
}

if (name == null || string.Equals(name, "XamlAutoFontFamily", StringComparison.OrdinalIgnoreCase))
Expand Down

0 comments on commit 80a87a3

Please sign in to comment.