InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ff = ifc.Families;
int i = 0;
foreach (FontFamily f in ff)
{
ListItem lt = new ListItem(f.Name.ToString(), f.Name.ToString());
if (System.Text.Encoding.GetEncoding("gb2312").GetBytes(lt.Value.Remove(1)).Length == 2)
{
i++;
if (lt.ToString() == Convert.ToString(dt_watermark.Rows[0]["WatermarkFonts"]))
{
builder.Append("<option value=\"" + lt + "\" selected='selected'>" + lt + "</option>");
}
else
{
builder.Append("<option value=\"" + lt + "\">" + lt + "</option>");
}
}
}