62,263
社区成员
发帖
与我相关
我的任务
分享
System.Drawing.Text.PrivateFontCollection myPfc = new System.Drawing.Text.PrivateFontCollection();
myPfc.AddFontFile(fontFile);//fontFile是字体文件,如果有多个字体文件可以继续添加
Font xFont = new Font(myPfc.Families[0], 20f, FontStyle.Regular, GraphicsUnit.Point, 0);
这样拿xFont这个字体对象使用就行了。