I want to use a thin font weight in my win forms window. The only thing I've been able to find is FontStyle, but I can only choose from Bold, Italic, Regular, Strikeout and underline. No possibility to make my font thin. Preferably, I'd like to be able to specify the font weight (100, 200 etc).
3 Answers
2
votes
I've not tried it, but looking through CreateFont function I believe it can certainly be done via P/Invoking CreateFont function.
It takes a parameter fnWeight which is font weight. Then you could call Font.FromHFont method to get the instance of Font.
1
votes
1
votes
As far as I know, you can't do it directly.
That being said, you embed WPF controls in Windows Forms pretty easily, and WPF controls have font weight property exposed directly. Perhaps that might be suitable?
SystemFonts.MessageBoxFont. It is the one that they prefer and find the most readable. - Cody Gray