Skip to content

Commit b7bd643

Browse files
committed
(#304) GetSystemFont: make it work with the localized font names
1 parent 252f936 commit b7bd643

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/WpfMath/TexFormula.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ internal Box CreateBox(TexEnvironment environment)
104104

105105
internal static SystemFont GetSystemFont(string fontName, double size)
106106
{
107-
var fontFamily = Fonts.SystemFontFamilies.First(ff => ff.ToString() == fontName);
107+
var fontFamily = Fonts.SystemFontFamilies.First(
108+
ff => ff.ToString() == fontName || ff.FamilyNames.Values?.Contains(fontName) == true);
108109
return new SystemFont(size, fontFamily);
109110
}
110111
}

0 commit comments

Comments
 (0)