■ InstalledFontCollection 클래스를 사용해 설치 폰트명을 출력하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
using System; using System.Drawing; using System.Drawing.Text; InstalledFontCollection collection = new InstalledFontCollection(); for(int i = 0; i < collection.Families.Length; i++) { FontFamily fontFamily = collection.Families[i]; string fontName = fontFamily.GetName(0); Console.WriteLine(fontName); } |