awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications
Apache License 2.0
384 stars 89 forks source link

Help with Input Fonts #58

Closed sbridgens closed 3 years ago

sbridgens commented 3 years ago

I am using this fantastic product you created in a winforms app and have found that whenever an input control is added the control size and font is decreased to what I would assume to be around a font size of 6.

The following entry was added to the app.config however this did not resolve the issue:

In order to demonstrate this issue the following can be done: 1: Create a basic winform app 2: Add the following controlls - Button, Label, Textbox, Richtextbox 3: change the font for each control to: Microsoft Sans Serif, 12pt 4: Add text to each control i used the same value of: "Microsoft Sans Serif, 12pt" 5: Run - everything should appear fine. 6: Install the Fontawesome.sharp nuget package 7: Add an IconButton to the form 8: Run the application and the input controls will shrink in size/font. Hopefully, this is a merely a setting I missed or need to consider?
sbridgens commented 3 years ago

Close, for now, I rolled back the framework; restarted vs 2019 rebuilt and then rolled forward again and for some reason every thing is fine again so I suspect this is related to dpi and toying with the frameworks managed to resolve the issue?

mkoertgen commented 3 years ago

Hi Simon, thanks for reaching out. From our experience DPI scaling can be complicated with WinForms. In fact, we had some issues reported affecting the overall scaling of a windows forms app, probably related to the point where the fontawesome fonts get loaded into memory. In the end it seemed to be mostly Heisenbugs, i.e. we never could lay our finger on it. Let me know if this bugs you again or find out something about this.