Fix font issue?
MODIFY
WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
@@ -4,17 +4,18 @@ using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Input.Platform;
+using Avalonia.Media;
using Avalonia.Styling;
using ReactiveUI;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
-using FontFamily = Avalonia.Media.FontFamily;
namespace WalletWasabi.Gui.Controls
{
@@ -125,7 +126,15 @@ namespace WalletWasabi.Gui.Controls
try
{
- FontFamily = FontFamily.Parse(fontName); // Use the font.
+ FontFamily ff = FontFamily.SystemFontFamilies.FirstOrDefault(x => x.Name == fontName);
+ if (ff != default)
+ {
+ FontFamily = ff; // Use the font.
+ }
+ else
+ {
+ throw new FormatException("Font is missing. Fallback to default font.");
+ }
}
catch (Exception)
{

Fix font issue?