Browse Source

Improve logging to troubleshoot font loading (#15230)

* Improve logging

* Update Typeface.cs

* add the key

* update
pull/15330/head
Artjom P 2 years ago
committed by GitHub
parent
commit
f98f6fff80
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      src/Avalonia.Base/Media/Typeface.cs

3
src/Avalonia.Base/Media/Typeface.cs

@ -89,7 +89,8 @@ namespace Avalonia.Media
return glyphTypeface;
}
throw new InvalidOperationException("Could not create glyphTypeface.");
throw new InvalidOperationException(
$"Could not create glyphTypeface. Font family: {FontFamily?.Name} (key: {FontFamily?.Key}). Style: {Style}. Weight: {Weight}. Stretch: {Stretch}");
}
}

Loading…
Cancel
Save