黄聪:C#获取系统中的所有字体


private void button1_Click(object sender, EventArgs e)
{
StringBuilder str
= new StringBuilder(2000);
System.Drawing.Text.InstalledFontCollection fonts
= new System.Drawing.Text.InstalledFontCollection();
foreach (System.Drawing.FontFamily family in fonts.Families)
{
str.Append(family.Name);
str.AppendLine();
}
textBox1.Text
= str.ToString();
textBox1.Focus();
textBox1.SelectAll();
}

【推广】 免费学中医,健康全家人
原文地址:https://www.cnblogs.com/huangcong/p/1698491.html