[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Monospaced fonts are meant to be mono-spaced, right?



Nicholas Seward wrote:
The letters may be different lengths.  However, the letters should be
spaced equally.  For example,"i" will be shorter than "w" but "hit"
and "hot" should be the same length.

No, that's not the way it should work. I just tried an experiment:

>>> f = Font("VeraMono.ttf", 12)
>>> f.size("e")
(7, 15)
>>> f.size("i")
(7, 15)

I suspect that the system is not actually giving you a
monospaced font. If it doesn't recognise the font name
you give it, you'll probably get some default font. Have
you tried rendering any text with the font to see what
it looks like?

I've given up on using SysFont because the results are
too unpredictable cross-platform. I always bundle my
own fonts with my games and use Font to load them
explicitly.

I like to use the Bitstream Vera fonts. They're nice,
small and very liberally licensed.

http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/

--
Greg