wpt如何获得本地化的字体列表?

时间:2010-12-31 06:07:03

标签: wpf

  foreach (FontFamily fam in Fonts.SystemFontFamilies)
            boxFamily.Add(fam);

例如,我得到“FangSong”的字体,但我想得到关于字体的中文(仿宋)。

请帮帮我,谢谢。

1 个答案:

答案 0 :(得分:0)

试试这个

foreach (FontFamily fam in Fonts.SystemFontFamilies)
            {
                Label lbl = new Label();
                lbl.FontFamily = new FontFamily(fam.ToString());
                lbl.Content = fam.ToString();
                listBox2.Items.Add(lbl);
            }

希望这会有所帮助