/// <summary> /// Init this instance to /// </summary> public static void Init() { var assemblies = AppDomain.CurrentDomain.GetAssemblies(); FontLoader.LoadFonts(assemblies, (fontName, s) => { fontName = fontName.ToLowerInvariant(); var copyStream = new MemoryStream(); s.CopyTo(copyStream); Typefaces[fontName] = new FontSource(copyStream); }); }
public override void OnCreate() { base.OnCreate(); FontLoader.LoadFonts(); }
private void loadFontsWorker_DoWork(object sender, DoWorkEventArgs e) { var fonts = FontLoader.LoadFonts(); e.Result = fonts; }