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

[pygame] Pygame font issues



Chaps,

I have the following code:

if pygame.font:
    font = pygame.font.Font(None, 36)
    #font = pygame.font.Font('liberationserif',36)
    text = font.render("Esc to quit.", 1, (10, 10, 10))
    textpos = text.get_rect()
    textpos.centerx = background.get_rect().centerx
    background.blit(text, textpos)

but I get the error:

Traceback (most recent call last):
  File "g6.py", line 77, in <module>
    font = pygame.font.Font(None, 36)
RuntimeError: default font not found 'freesansbold.ttf'
bash-3.1$      

Now swapping the comments on the font= lines to use liberationserif which
definitely is on my system I get a similar fault.  Any suggestions on a
remedy?  Running on linux (Slack 12.2) if that makes a difference.

Pete

-- 
Peter Chant
http://www.petezilla.co.uk