Skip to content

Commit c037313

Browse files
committed
fix: if font family name contains '#', make sure we have that built-in font
Signed-off-by: leo <[email protected]>
1 parent d21b790 commit c037313

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/App.axaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,15 @@ private string FixFontFamilyName(string input)
671671
prevChar = c;
672672
}
673673

674+
var name = sb.ToString();
675+
var idx = name.IndexOf('#');
676+
if (idx >= 0)
677+
{
678+
if (!name.Equals("fonts:Inter#Inter", StringComparison.Ordinal) &&
679+
!name.Equals("fonts:SourceGit#JetBrains Mono", StringComparison.Ordinal))
680+
continue;
681+
}
682+
674683
trimmed.Add(sb.ToString());
675684
}
676685

0 commit comments

Comments
 (0)