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

Re: [pygame] FreeSanBold Font and Screen Terminating Problems



On Fri, 29 Feb 2008 08:25:46 +1300, Greg Ewing
<greg.ewing@xxxxxxxxxxxxxxxx> wrote:
> Unnsse Khan wrote:
>> Subsequently, I installed freessansbold.ttf into Leopard and when I re-
>> ran the program, nothing changed?!
> 
> Even if you manage to get this working on your own machine,
> I'd recommend you not rely on default fonts for anything
> you release to others, and include a font with your game.
> Whether pygame can find default fonts on any given
> installation seems to be rather hit-and-miss, in my
> experience.


I second this advice. In my experience on Windows, using the default font
(with "my_font = pygame.font.Font(None, 24, 0)" or something like that)
works fine in IDLE, then mysteriously crashes when I build an EXE for
others to see. Not fun. So, definitely specify a font. If you want
something distinctive, just Google "free fonts" or the like. One that I've
been using is "Eager Naturalist" by "Tepid Monkey."

Note also that there seems to be a problem with using a Font object without
anti-aliasing on Linux. I had released something and been told it didn't
work unless people changed the font-creating line to make the font
anti-aliased (changing the 0 to a 1 in the statement above). Weird, since
anti-aliasing is actually more complex than not doing it, but it looks
nicer that way anyway.

Kris