News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Monospace Font

Started by Alpha, November 12, 2012, 02:55:30 AM

Previous topic - Next topic

Alpha

I have noticed that Ubuntu's default monospace font actually makes characters wider if they are bold.  For example, the following two comments would line up when I use Windows, but not when I use Ubuntu:
bold     // comment
not bold // comment


This is not exactly a Code::Blocks problem, but I was wondering if anyone had suggestions of what I could do about it (seeing a bolded if() not quite align properly is rather annoying).  Perhaps another font setting?

oBFusCATed

Why don't you report this to ubuntu developers?
(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!]

thomas

A monospace font is not truly monospace when boldface is different from regular, if you ask me.

However, before complaining with them, you need to make sure this is really the bold variant, not a faux bold generated by... what's the backend, GTK/Cairo? If it's the latter, then it's just the "usual shit", and not something you can blame the font developers for. And, probably something one can't do about anything.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

oBFusCATed


if       // comment
return   // comment
retur    // comment

For me this is perfectly aligned on Centos 5.8...

(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!]

Alpha

Quote from: thomas on November 12, 2012, 11:42:31 AM
However, before complaining with them, you need to make sure this is really the bold variant, not a faux bold [...]
That would probably be the reason, if I had to guess, but I do not know how I would check.

I "fixed" the problem within Code::Blocks by switching the editor's font from its default setting of "Monospace" to "Liberation Mono" (now to see if I can do the same with system wide settings...).

Quote from: oBFusCATed on November 12, 2012, 09:00:19 AM
Why don't you report this to ubuntu developers?
I plan to do that as well.

thomas

Quote from: Alpha on November 12, 2012, 11:12:19 PM
Quote from: thomas on November 12, 2012, 11:42:31 AM
However, before complaining with them, you need to make sure this is really the bold variant, not a faux bold [...]
That would probably be the reason, if I had to guess, but I do not know how I would check.
My guess would be that if it only opens one font file, it must be faux bold. If it's a bold face, it must at least open 2 font files. So, lsof | grep codeblocks or something similar should provide that info, I'd guess.

If it's faux bold, the next question would be why it does such a thing (unless no true font face is present, which pretty much makes the reason self-evident). If no good reason can be found, it would be a candidate for bug report to the GTK guys, I guess.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."