InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ff = ifc.Families;
DropDownList6.Items.Clear();
//先加中文的字体
foreach (FontFamily f in ff)
{
if (Regex.IsMatch(f.Name, @"[\u4e00-\u9fa5]+"))
{
DropDownList6.Items.Add(f.Name);
}
}
//再加英文字体
foreach (FontFamily f in ff)
{
if (!Regex.IsMatch(f.Name, @"[\u4e00-\u9fa5]+"))
{
DropDownList6.Items.Add(f.Name);
}
}