monospace

How do I get all installed fixed-width fonts?

天涯浪子 提交于 2019-11-26 20:17:00
问题 I'm wondering if there are any simple ways to get a list of all fixed-width (monospaced) fonts installed on a user's system in C#? I'm using .net 3.5 so have access to the WPF System.Windows.Media namespace and LINQ to get font information, but I'm not sure what I'm looking for. I want to be able to provide a filtered list of monospaced fonts and/or pick out monospaced fonts from a larger list of fonts (as seen in the VS options dialog). 回答1: Have a look at: http://www.pinvoke.net/default