* * *

Author Topic: [Solved] Default Font on Windows 10  (Read 246 times)

sfeinst

  • Full Member
  • ***
  • Posts: 182
[Solved] Default Font on Windows 10
« on: May 29, 2018, 03:07:08 pm »
I am having trouble with fonts on Windows 10.  When I run Lazarus (I'm using v1.8.2), everything looks good.  I create a form, put a button on it, put a TSelectDirectoryDialog on it and for code of the button, I just perform an Execute on the dialog.

If I right-click the Dialog icon and choose Test Dialog, it looks correct.

When I run my app, the fonts do not look correct.  The button font is different than Windows 10 default and slightly bold.  The same for the dialog font.

I've attached a good version (what Test Dialog shows) and a bad version (what my app shows).

Since Lazarus itself looks right, I'm guessing I have to set something in my app to use the correct default font.  What does Lazarus do?

« Last Edit: May 29, 2018, 04:47:09 pm by sfeinst »

LazProgger

  • New member
  • *
  • Posts: 33
Re: Default Font on Windows 10
« Reply #1 on: May 29, 2018, 03:44:33 pm »
That is because of the dpi awareness of your program.
Change the dpi settings to be dpi aware in your project options and it will look goog again.

wp

  • Hero Member
  • *****
  • Posts: 4602
Re: Default Font on Windows 10
« Reply #2 on: May 29, 2018, 04:21:50 pm »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

sfeinst

  • Full Member
  • ***
  • Posts: 182
[Solved] Re: Default Font on Windows 10
« Reply #3 on: May 29, 2018, 04:41:04 pm »
Thank you both.  Turning on DPI awareness solved the problem.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus