Windows font size

I want to use thin font in the win form window. The only thing I could find was FontStyle, but I can only select Bold, Italic, Regular, Strikeout and underline. There is no way to make my font thin. Preferably, I would like to specify the font size (100, 200, etc.).

+1


source to share


3 answers


In deployment, you will need to add a thin font font file.

Then you can use it in your application.



It will probably cost you licensing, I'm afraid. WPF makes it simpler, so it may be a more viable option depending on how big the need is and how big the budget is.

+1


source


As far as I know, you cannot do this directly.



As you say, you insert WPF controls into Windows Forms quite easily, and WPF controls have a font weight property set directly. Perhaps this might be appropriate?

+1


source


I haven't tried it, but am looking at CreateFont . I'm pretty sure it can be done through the P / Call of the CreateFont function .

A parameter is required fnWeight

which is the weight of the font. Then you can call the Font.FromHFont method to get the font instance.

0


source







All Articles