【发布时间】:2013-01-09 08:32:35
【问题描述】:
我想在我的 winform 应用程序中使用特定字体。此字体将从我的应用程序资源自动安装在用户个人计算机中。
我该怎么做?
我使用了一些来自用户个人计算机的代码。如果我使用它,font 必须以前保留在用户个人计算机中,但我不希望这样。
System.Drawing.Text.PrivateFontCollection fontCollection = new System.Drawing.Text.PrivateFontCollection();
fontCollection.AddFontFile(@"C:\Windows\Fonts\SUTOM__.TTF");
FontFamily family = new FontFamily("SutonnyMJ", fontCollection);
Font font3of9 = new Font(family, 15);
label1.Font = font3of9;
【问题讨论】:
标签: c# winforms fonts installation