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

[BUG] Re: [pygame] Windows, Pygame and FreeSans?



hi,

they should be rendering exactly the same, as they don't use the OS
facilities for font rendering.

It's likely you have different freetype/SDL_ttf libraries on windows and linux?

Which version do you have of pygame on windows?

Cheers,

On 8/17/07, Ethan Glasser-Camp <glasse@xxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> In tinkering, I switched my game to use FreeSans (from the
> ttf-freefont package) rather than FreeSansBold, only to discover that
> this gives rendered text a weird "double-spaced" look on Windows.
> Probing deeper, I discovered that on my Linux machine, I get these
> results:
>
> >>> f = pygame.font.Font('freesans.ttf', 17)
> >>> f.get_ascent()
> 14
> >>> f.get_descent()
> - -3
>
> Whereas on Windows, the same font has an ascent of 21 and a descent of
> - -7! I can get the text to render "correctly" by ignoring the ascent
> and descent and just using the figures I got on my Linux machine, but
> I'd really like to know why the different figures. (I copied the .ttf
> file over to the Windows machine, so it's the same file.) How can I
> debug this? Open the font up in FontForge or something?
>
> Ethan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGxLnQhRlgoLPrRPwRAsZ+AJ9xu5igMQa108W78sEgkonsu/dblQCgjWVY
> X3UfMbON9KpN7gJ9p2vwWKI=
> =EPpD
> -----END PGP SIGNATURE-----
>