コード例 #1
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);
        }
コード例 #2
0
 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);
     }
 }