Comments misaligned when using custom monospaced font

I recently noticed that when I switch the editor to use a custom monospaced font (Pragmata) that comments no longer align properly in the editor. It doesn't affect the code, only the comments. If I switch back to Courier New, the default, they do line up. It's not the font because the editor in WebLogic Workshop (also a Java app)aligns them fine. I also opened the file in Textpad and no problems there either. I tested on 5.02 and most of the newer EAPs and the bug is present in all the latest versions.

Grant

4 comments

A quick follow-up: apparently IDEA does not show my font as a monospaced font despite the fact it is a monospaced font. Not sure if there is a setting somewhere I can change so IDEA will recognize it as a monospaced font. The other editors I use show it as a monospaced font so I'm not sure what's going on with IDEA.

Grant

0

Are you absolutely sure that your font is REALLY monospaced?
I am asking because I use a font (ProFontWindows) that's
"almost monospaced", i.e. it's monospaced as long as I don't
use bold letters. (I had to completly rework all my
highlighting settings because of this, but that font is so
great it has quickly payed off ...)

Regards,
Jens

0

Hi Grant,
I had same issues with pragmata and comments, so I had to get rid of bold formatting.
see thread:
http://www.intellij.net/forums/thread.jsp?forum=22&thread=149299&message=4883596&q=636f6d6d656e7473#4883596

Marcus commented:

*Try using another font, or a color scheme without any bold elements. IIRC, Pragmata is one of those "false monospaced" fonts, i.e., it's characters are monospaced, but there isn't a proper bold version -- bold characters are derived from the standard ones, and wider than the others.*

0

Yep, that did it. I removed the bold formatting from my comments and they aligned properly. Thanks for the workaround. It appears to be a new issue related to JDK 1.5 since Workshop 8.1 is using a 1.4 JDK and bold comments in the Pragmata font do align in its editor.

Grant

0

Please sign in to leave a comment.