示例#1
0
        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);
        }
示例#2
0
        private void BuildFont()
        {
            fstyle = FontStyle.Regular;
            foreach (string key in styleset.Keys)
            {
                fstyle = fstyle | styleset[key];
            }
            int idx = GlobalFontCollection.GetIndex(FileName);

            fnt = new Font(GlobalFontCollection.PFCollection.Families[idx],
                           size, fstyle);
        }
 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);
     }
 }