在C#中,可以使用Installed Font Collection表示已经安装的字体集合。该类属于System. Drawing. Text 名称空间下。
代码如下:
1 2 3 4 5 6 |
InstalledFontCollection IFCs = new InstalledFontCollection(); FontFamily[] arr = IFCs.Families; foreach(FontFamily IFC in arr) { MessageBox.Show(IFC.Name); } |
+1