tags:

views:

625

answers:

3

I'm trying to use fixed width fonts in Java. I can use Courier or Lucida Console, but when I apply a "bold" style, it makes the characters larger in width and that's not acceptible in my application. Is there anyway I can force the bold characters to have the same width as non-bold characters?

+1  A: 

The only solution I can think of is to find a font face that renders with exactly the same width regardless of the bold property. I am yet to find such font.

Mario Ortegón
+1  A: 

re @Mario Ortegon's suggestion, I asked on a Sun forum and someone suggested Lucida Sans Typewriter, which does appear to work, but it looks pretty lousy. >:(

Jason S
Guess we can't have it both ways :( (+1, this is a solution)
Mario Ortegón
+2  A: 

Monospaced should work on any platform. On Windows, I like Consolas. Courier New should also work.

Ayman
"Monospaced" works. Courier New appears to be the same thing. Consolas doesn't seem to work on my machine (and I have Windows)
Jason S
Not only that Monospaced works but it loads faster on my Windows machine.
Boris Pavlović