假如有字体在 C:\Projects\MyProj\free3of9.ttf ,可以使用 PrivateFontCollection 添加字体。 下面的代码就可以使用本地的 free3of9.ttf ,需要注意添加的 FontFamily 是需要知道字体名,和传入 PrivateFontCollection 才可以使用。 PrivateFontCollection collection = new PrivateFontCollection(); collection.AddFontFile(@"C:\Projects\
34 /// The m font collection
35 ///
36 private static readonly PrivateFontCollection m_fontCollection = new PrivateFontCollection();
37
38 ///