Author Topic: CodeBlocks' font is quite blur compare with other applications under Windows 7  (Read 1919 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4992
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Because you are on Windows 7 and there is no HiDPI scaling, this setting does nothing on your system ;)

Hi, here is the good news, when reboot my computer, and now start the modified C::B(change the manifest file of codeblocks.exe to revert the commit 10954), then the font is clean now. Maybe Windows 7 just caches the codeblocks.exe? Or the option "True/PM" has some side effects.  :)
« Last Edit: March 06, 2017, 12:59:04 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline sodev

  • Multiple posting newcomer
  • *
  • Posts: 108
Looks like i was wrong, High DPI scaling exists since Windows Vista, Windows 8 just changed how it works and added the Per-Monitor option. Strange that MSDN lists these settings to work only on Windows 8.1 onwards. So these settings do something for you as well :). I was just confused how good CodeBlocks looks for you, im on Windows 10 and if scaling is used there it looks much more worse.

But now the really confusing part is, reverting that mentioned commit marks the program non-DPI-Aware and actually ENABLES the scaling so it should look worse :o! I am on Windows 10 and face the problem that a lot of programs look really bad because they don't mark themself as DPI-Aware so the scaling is enabled and i have to DISABLE the scaling for them.

To disable the scaling at least on Windows 10 there is an easier option than editing the manifest. In the Properties dialog of the .exe file on the tab Compatibility Settings (don't know the exact wording, i don't have an english Windows) there is the option to disable DPI scaling, this does the same like marking the program DPI-Aware through the manifest. I don't know if Windows 7 has the same setting that does the same magic.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4992
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I'm really confused about this option. It looks like under Win10, you need the option: <dpiAware>False</dpiAware>. While under Win7, I need the option <dpiAware>True/PM</dpiAware>.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline sodev

  • Multiple posting newcomer
  • *
  • Posts: 108
Hmm, apparently reading is not my thing today. Mortens commit set the value to False, reverting that turns it back to True/PM and thats what we both need. I messed that up in my last post, but now everything makes sense for me :).

<dpiAware>True/PM</dpiAware> -> Application is DPI-Aware, scaling DISABLED
<dpiAware>False</dpiAware> -> Application is NOT DPI-Aware, scaling ENABLED

The problem with scaling DISABLED is that icons and other resources stay small while text gets bigger if the zoom factor is bigger than 100%, that might cause some layout issues if you use the size of the icons as constraint. The problem with scaling ENABLED is that text looks blurry (actually icons too because everything gets bitmap scaled, but blurry icons are not so noticeable than blurry text).