public void LoadCustomFamilyData(string path = null) { if (path == null) path = this.sourcePath; this.sourcePath = path; if (String.IsNullOrEmpty(this.sourcePath) || !File.Exists(this.sourcePath)) this.sourcePath = null; else { this.customFamilyData = File.ReadAllBytes(this.sourcePath); this.familyName = LoadFontFamilyFromMemory(this.customFamilyData).Name; } }
public void ImportFile(string srcFile, string targetName, string targetDir) { string[] output = this.GetOutputFiles(srcFile, targetName, targetDir); Font res = new Font(); res.LoadCustomFamilyData(srcFile); res.ReloadData(); res.Save(output[0]); }