WPF: How to filter out non-Roman fonts from Fonts.SystemFontFamilies?

后端 未结 3 1113
逝去的感伤
逝去的感伤 2021-01-12 05:29

I know how to create a WPF font picker with a few lines of XAML, binding to Fonts.SystemFontFamilies (thanks to Norris Cheng\'s excellent blog post), but I can\

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 05:49

    I could not find an easy reliable way to do this. I think the best solution is to honor the hidden state of fonts as provided by Windows 7. This way users can hide/show fonts as they see fit but also hide all fonts inappropriate for their region. Unfortunately there is no documented API to find out if a font is hidden or not but you can use a registry setting.

    Here is an article that explains how to do it:

    • Honoring Hidden Fonts

提交回复
热议问题