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

Re: [pygame] freesansbold.ttf



On Sun, May 8, 2011 at 1:56 PM, Nathan BIAGINI <nathan.open@xxxxxxxxx> wrote:
Hi everyone.

The default font of Pygame seems to be missing... how can i solve it?

RuntimeError: default font not found 'freesansbold.ttf'
 
 
This is what I use:
 
# 11 point Vera is a good font for menus and button labels
try:
    vera = pygame.font.Font('Vera.ttf', 11)
except:
    print('Warning: could not load "Vera.ttf" -- text will be ugly!')
    vera = pygame.font.SysFont('arial,microsoftsansserif,courier', 13)
 
 

Attachment: vera.zip
Description: Zip archive