public FileFont(string filename) { FileName = filename; styleset.Add("Bold", FontStyle.Regular); styleset.Add("Italic", FontStyle.Regular); styleset.Add("Strikeout", FontStyle.Regular); styleset.Add("Underline", FontStyle.Regular); GlobalFontCollection.AddFont(FileName); }
public void CreateCompFont() { if (InFile) { GlobalFontCollection.AddFont(FileName); int idx = GlobalFontCollection.GetIndex(FileName); Font = new Font(GlobalFontCollection.PFCollection.Families[idx], Size, Style); } else { Font = new Font(FamilyName, Size, Style); } }