1 parent 9b77145 commit 2735749Copy full SHA for 2735749
1 file changed
Source/Demo/WPF/DemoWindow.xaml.cs
@@ -52,15 +52,13 @@ public DemoWindow()
52
/// </summary>
53
private void LoadCustomFonts()
54
{
55
- // TODO:a load custom fonts
56
- // // load custom font font into private fonts collection
57
- // var file = Path.GetTempFileName();
58
- // File.WriteAllBytes(file, Resources.CustomFont);
59
- // _privateFont.AddFontFile(file);
60
- //
61
- // // add the fonts to renderer
62
- // foreach (var fontFamily in _privateFont.Families)
63
- // HtmlRender.AddFontFamily(fontFamily);
+ // load custom font font into private fonts collection
+ var file = Path.GetTempFileName();
+ File.WriteAllBytes(file, Common.Resources.CustomFont);
+ var customFont = new FontFamily(file);
+
+ // add the fonts to renderer
+ HtmlRender.AddFontFamily(customFont);
64
}
65
66
/// <summary>
0 commit comments