Open GoogleCodeExporter opened 9 years ago
Another problem is that I don't see a possible workaround if I run this on a
system without a font it can find because this happens in the clinit. Perhaps
in that case the DEFAULT should be null?
Original comment by satur9n...@gmail.com
on 26 Dec 2014 at 5:30
[deleted comment]
I see now that the documentation specifies that "Monospaced" should correspond
to some monospaced font on the system, unfortunately it's not working.
I think as a backup perhaps you will need to search the installed font families
to find a monospaced font. Also it would be better to do this lazily in case
the app is being run on a terminal and doesn't need to find it's own fonts.
Currently because it is initialized during class loading it happens even when
the DefaultTerminalFactory ends up choosing UnixTerminal.
Original comment by satur9n...@gmail.com
on 28 Dec 2014 at 11:59
Actually, the problem above isn't that there isn't a Monospaced font on your
system, it's that the actual font behind the "Monospaced" alias wasn't actually
mono-spaced. The code will measure the width of 'i' and 'W' and if they're not
the same then the font isn't considered valid monospaced.
So your Ubuntu installation seems to have a Monospaced font which isn't
monospaced... I suppose we could add something that scans the font-list a bit
more carefully instead of throwing an exception like that.
Original comment by mab...@gmail.com
on 11 Jan 2015 at 11:05
Original issue reported on code.google.com by
satur9n...@gmail.com
on 26 Dec 2014 at 5:14