添加自定义字体

System.Drawing.Text.PrivateFontCollection privateFonts = new System.Drawing.Text.PrivateFontCollection();
privateFonts.AddFontFile("C:\\Documents and Settings\\QuartzMS.ttf");
System.Drawing.Font font = new Font(privateFonts.Families[0], 12);
label1.Font = font;

 

posted @ 2020-05-07 15:52  -H&H-  阅读(351)  评论(0)    收藏  举报