开发者

Pygame Font not consistent

I'm working on a program in python+pygame with some other developers, and we're seeing the same font rendered differently. It's a free font that 开发者_JAVA技巧we're distributing with the game. On my machine, this particular font is rendering 10px lower than on another developer's machine.

Any thoughts on why this is?


I encountered the same problem but it was when using too different releases of the pygame stuff (especially the truetype library), try to compare the versions of pygame, sdl, sdl-ttf and the freetype library.


It's a free font that we're distributing with the game.

But whilst you are prototyping and building the program, are you referencing the font file from a local directory within the project, or are you just using the same font, but 'installed' on each machine?

If so, it could be that one machine has a slightly differing version of the font. Try and use the font just from a directory in the project and see if that helps.

Otherwise, it could be some crazy ClearType / TrueType settings or font anti-aliasing or something. I would have no idea how to fix that. Maybe try converting it to a different file format?


To test: Place a copy of the font the same folder as a python script. Or maybe similar font is being loaded.


Pygame uses te installed fonts on your operating system: maybe you have some different fonts installed or not installed? If so then it will default to a different font than you expect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜