Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently upgraded to Ubuntu 12.04, and I see that when using eclipse for editing source code, the bold characters displayed with the Monospace font are actually thicker than the non-bold ones. Thus, the Monospace font is actually not mono-space. (same space for all characters)

Is this a known issue? Am I missing something?

How do I make it mono-space again?

share|improve this question
    
Monospace font is indeed thicker when bold than not... that's what bold means. Do you mean wider? It's not wider. If the same word in Monospace take up more of the line when bold versus normal, then perhaps Eclipse is changing the font size on you. –  Chan-Ho Suh May 23 '12 at 11:24
    
For example, look at this: cloudfront.omgubuntu.co.uk/wp-content/uploads/2011/09/mono.jpg –  Chan-Ho Suh May 23 '12 at 11:25
1  
Same problem here. As many things are typically screwed after updating, I went through settings (antialiasing, hinting, etc.), but no luck. –  dbrank0 Jun 13 '12 at 8:29
1  
Same problem with droid mono, but others, like bitstream-vera mentioned below (or Liberation Mono) are fine. :/ –  dbrank0 Jun 13 '12 at 8:48
    
I had the same issue with NetBeansIDE (7.4). Monospace font (both bold and normal) displayed fine, until I installed PlayOnLinux and Wine, after which normal versions became narrowed than bolded. The bitstream-vera font mentioned below works fine and is an acceptable workaround. –  loostro Feb 17 at 13:18
show 1 more comment

3 Answers 3

I'm having a similar problem with Monospace.

As a workaround I've switched to using Bitstream Vera Sans Mono which looks very similar but doesn't have the bold problem.

If you don't have it, you can install it by doing sudo apt-get install ttf-bitstream-vera.

share|improve this answer
    
It seems font hinting is broken for the system default monospace fonts (both Monospace and Ubuntu Mono). It appears to work for Bitstream Vera Sans Mono though - thanks for the tip! –  kynan Jul 3 '12 at 18:17
    
Thanks, that helped alot. As I mentioned above - my problems began after installation of PlayOnLinux and Wine.. which seem to have altered some font configs. –  loostro Feb 17 at 13:19
add comment

Monospace refers to all fixed-width font. There is also a specific monospaced font called Monospace. Suppose you refer to the specific Monospace font.

I use Monospace font in Libreoffice/Openoffice to align sequences under Ubuntu 12.04. I noticed the same issue: bold Monospace letters are wider than the regular Monospace letters of same size, though they are still monospaced, i.e. fixed-width. See picture

enter image description here

To find an alternative, have a look at this article TOP 10 PROGRAMMING FONTS. I use Daja vu sans mono or Courier New, which show same width for regular and bold facetypes. At least Inconsolata has the same problem as Monospace.

share|improve this answer
add comment

It appears that the font configuration in 12.04 sets Droid Sans Mono as the default monospace font (see /etc/fonts/conf.d/60-droid-sans-mono-fonts.conf), and as the OP describes, the glyphs in the bold version of this font have a different width than those in the normal version.

To change the system default monospace font, create /etc/fonts/local.conf containing something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>DejaVu Sans Mono</family>
    </prefer>
  </alias>
</fontconfig>

This way, you won't have to remember to change the Eclipse editor font for every workspace you use.

share|improve this answer
    
I had to end up un-bolding everything in Eclipse because this was driving me up the wall. I need to try this though! –  advocate Jul 9 at 0:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.