Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: ollydbg on October 22, 2020, 02:11:43 pm
-
Hi, it looks like C::B's editor can't measure the Chinese character correctly, so that I can't make the comment get alignment, this does not happen in Notepad++'s editor.
See the image shot below for comparing.
Any ideas? I have set the same font "Courier New, size 10" in those two editors. Note a normal Chinese character is double width of a normal English character.
-
Have you enabled ligature support in one or the other? What about the latest STC sample in wxWidgets?
-
Have you enabled ligature support in one or the other?
I just tested it, under C::B, the alignment issue happens in both normal mode or ligature mode.
Under Notepad++, I only use the normal mode, and it does not have such alignment issue.
What about the latest STC sample in wxWidgets?
I haven't tried it yet. Will try it if I have more time.
-
If you overlay the images in gimp/photoshop you'll see that font rendering is totally different. I don't know why.
-
OK, I find the reason of this issue.
This issue also happens in the latest Notepad++.
The problem is that a bold Chinese font is a bit wider than a normal Chinese font.
Under C::B, when the Chinese character is after the , which means it's a doxygen style comment, it will be bold, and this issue happens. If I set the doxygen comment font style to bold font, this issue also happens under Notepad++.
I'm not sure how I can solve this. :(