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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Hi, I have a new Windows 7 PC, and I just copy a C::B installation(in-fact, I use a portable C::B launcher)
But the font in C::B is blue, see the screen shot below, other applications don't have this issue, see another screen shot of Spyder IDE.
Both the C::B and Spyder using the same font, that is called "Consolas" in the editor. But I see that C::B's font in either Menu bar or inside editor are all blur. Only the C::B's title bar show some clean font texts.
Any ideas?

C::B under Windows 7 64bit



Other application


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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Maybe this is related:windows - Blurry text on wxWidgets controls - Stack Overflow, my screen is 1920x1080.
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.

Online sodev

  • Multiple posting newcomer
  • *
  • Posts: 68
No its not, that problem is about HiDPI scaling that Windows 8 and onwards do on certain zoom levels. Have you ClearType turned on? Have you set a custom zoom level, maybe even the Windows XP style one?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
No its not, that problem is about HiDPI scaling that Windows 8 and onwards do on certain zoom levels. Have you ClearType turned on?
Thanks.
I think I have ClearType feature turned on. (It is enabled by default?, since It's a new notebook)

Quote
Have you set a custom zoom level, maybe even the Windows XP style one?
I have no zoom level. It looks like the text inside the editor and in the Menu bar are all blurry, so this should not caused by zoom level.

What's the Windows XP style means? I have a file named "codeblocks.exe.manifest" along with codeblocks.exe which is used to solved an issue of wxListCtrl under Windows XP. But now, remove this file does not solve any issue.

All my testing environment is the latested nightly build version released March 01 in 2017.
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.

Online sodev

  • Multiple posting newcomer
  • *
  • Posts: 68
My bet was since wxWidgets 2.8 is quite ancient these functions might cause some problems so you could try to disable them. When you set a custom zoom level in Windows 7 there is the option to do it like Windows XP, thats what i was referring to.

Where have you got this .manifest file from? You need this e.g. for enabling Themed Controls so that your Buttons and Lists dont look like from Windows 95 but usually this file gets embedded into the .exe file, you dont need an extra one. I never used a nightly, i always compile myself, cant remember having seen that file in the output ever, but cant check right now to be sure. What happens when you remove the file?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10019
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Follow this page: How to Tweak ClearType in Windows for Better Screen Readability, I see that my ClearType feature is ON, I just try to disable this feature, and I found that the font get more blur, so bad :(

Check this commit: https://sourceforge.net/p/codeblocks/code/10954/
I looked at this commit, and I see that some manifest option is adjusted, but I think this manifest file is build into the codeblocks.exe, so that I have no idea how to adjust it, or maybe I have to rebuild cb?

My bet was since wxWidgets 2.8 is quite ancient these functions might cause some problems so you could try to disable them. When you set a custom zoom level in Windows 7 there is the option to do it like Windows XP, thats what i was referring to.

Where have you got this .manifest file from? You need this e.g. for enabling Themed Controls so that your Buttons and Lists dont look like from Windows 95 but usually this file gets embedded into the .exe file, you dont need an extra one. I never used a nightly, i always compile myself, cant remember having seen that file in the output ever, but cant check right now to be sure. What happens when you remove the file?
Under Windows XP, the external .manifest file has more precedence(but under Win7 and later Windows version, the embedded manifest has more precedence), so I put this file there to force C::B to use a more modern common control, so that the wxListBook shows correctly. See discussion here:Bad icons of C::B in the 16.01 release
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10019
I looked at this commit, and I see that some manifest option is adjusted, but I think this manifest file is build into the codeblocks.exe, so that I have no idea how to adjust it, or maybe I have to rebuild cb?
You'll probably have to revert it, build  against wx3.1 and start fixing things.
This commit is just a workaround for no HiDPI support in wx/cb.
You can try Biplap's wx3.1 builds to see if things are better there.
Probably there is a tool that can be use to replace the manifest in an executable. But I'm a linux dev, so I have not much experience in developing on windows.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
You can try Biplap's wx3.1 builds to see if things are better there.
I just download his builds, and it font's show quite clean in his builds, great! So, 64bit C::B + wx3.02 works OK.
But my personal builds 32 bit C::B + wx 3.1 works badly.
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.

Online stahta01

  • Lives here!
  • ****
  • Posts: 5798
    • My Best Post
You can try Biplap's wx3.1 builds to see if things are better there.
I just download his builds, and it font's show quite clean in his builds, great! So, 64bit C::B + wx3.02 works OK.
But my personal builds 32 bit C::B + wx 3.1 works badly.

Might be the difference between Mingw32 and Mingw64 based compilers being used.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
You can try Biplap's wx3.1 builds to see if things are better there.
I just download his builds, and it font's show quite clean in his builds, great! So, 64bit C::B + wx3.02 works OK.
But my personal builds 32 bit C::B + wx 3.1 works badly.

Might be the difference between Mingw32 and Mingw64 based compilers being used.

Tim S.
Hi, Tim, my personal builds 32 bit C::B and wx 3.1 were using MinGW64's MinGW-Build GCC 5.4 version.
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Check this commit: https://sourceforge.net/p/codeblocks/code/10954/
Hi, oBFusCATed, it looks like this commit(the commit is pushed by Morten in 2016-12-29) cause such issue.

I just download the previous nightly build version which is: The 20 November 2016 build (10922) is out., I don't see the blur font issue.
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10019
Of course the commit by Morten causes blurring. If you read what this flag does you would have known it without the need for testing. :)
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Of course the commit by Morten causes blurring. If you read what this flag does you would have known it without the need for testing. :)
Well, the strange thing is, I use a resource editor to change the embeded manifest file of the codeblocks.exe, and change the value from "False" to "True/PM", and it looks like the changed C::B is still blur. :(
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.

Online sodev

  • Multiple posting newcomer
  • *
  • Posts: 68
Because you are on Windows 7 and there is no HiDPI scaling, this setting does nothing on your system ;)