Nilhcem / FakeSMTP

Dummy SMTP server with GUI for testing emails in applications easily.
http://nilhcem.github.com/FakeSMTP/
Other
990 stars 319 forks source link

Fix too tiny font in textareas on Windows #49

Open alt-grr opened 8 years ago

alt-grr commented 8 years ago

Default font on Windows was 9pt, which was nearly impossible to read on HiDPI screens:

image

Vest commented 8 years ago

Hello @kuc,

I appreciate that you have created PR, but I am afraid to tell you that your solution might work well for you, and work badly for other users. I am usually against of hard-coded values such as the font size. Here is the small test that I made on my PC: Windows 10, Display: 27 in., 2560x1440. I haven't changed the font size:

Before the patch is applied (100% Text Size): 100_before

After the patch is applied (100% Text Size): 100_after

Before the patch is applied (150% Text Size):

150% before patch

After the patch is applied (150% Text Size):

150% after patch

As you can see, in my case, the font size in the log view is slightly taller with your code in both cases. So I would say that the text wasn't scaled proportionally. I can ask you to do similar screenshots and update the PR. At least this can give us some clue how the issue can be fixed.

I expect that all fonts should be scaled proportionally when you increase the text size: text_size

Thanks!

alt-grr commented 8 years ago

Below screenshot from different computer. This time non-HiDPI screen (1366x768), Windows 8.1 instead of 10 as previously in my example, 100% font scaling, but problem is the same - font size in textarea is super-tiny:

image

After my (old) patch:

image


I think that problem is that on your computer you have different default font family applied to textarea (side effect of different OS localization settings?). I will change my commit to more flexible solution.

alt-grr commented 8 years ago

After latest changes font size looks good, too:

image

alt-grr commented 8 years ago

Looks good also on HiDPI:

image

Vest commented 8 years ago

Hm, I do not know @kuc. I am not the maintainer, but I do not like the proposed solution. To me it looks like a magic number that I'd like to avoid at any costs. E.g. this is how your code looks on my Mac: screen shot 2016-07-22 at 11 41 37 pm

But even without the fix, it is not bad: screen shot 2016-07-22 at 11 44 36 pm

I am still confident that your machines override the text area font size. Otherwise, I do not understand why our screens are so different.