C# 列舉系統所有字型 並指定選擇字型
C# 列舉系統所有字型 並指定選擇字型
List<string> fonts = new List<string>();
foreach (FontFamily font in System.Drawing.FontFamily.Families)
{
fonts.Add(font.Name);
}
for (int i = 0; i < fonts.Count; i++)
{
if ((fonts[i] == “Arial Narrow”)) //2017/03/01 || (fonts[i] == nowFont.Name))
{
txtSys_05.SelectedIndex = i;
break;
}
}