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

Re: [pygame] freesansbold.ttf



Ok so now the freesansbold font seems to be found but i got a Fatal error each time i want to use it.

2011/5/8 Nathan BIAGINI <nathan.open@xxxxxxxxx>
Hum... Nicer i can't say but it's a pretty simple font and also usable for menu etc... i think.


2011/5/8 David Burton <ncdave4life@xxxxxxxxx>
Hmm..   Well, I searched on my HDD, and found
pygame-1.9.1release\lib\freesansbold.ttf
It is attached.  I don't think I've ever used it.  Is it a good-looking font?  Nicer than Vera?
 
Dave


On Sun, May 8, 2011 at 2:59 PM, Nathan BIAGINI <nathan.open@xxxxxxxxx> wrote:
Yeah but in fact. I'm using Ocemp GUI and i refer to freesansbold which is the default font indirectly. So maybe i can change the default font of pygame? Or maybe i have to add freesansbold.ttf in Pygame cause it seems to be missing :

the pygame.font.match_font('freesansbold') returns None


2011/5/8 David Burton <ncdave4life@xxxxxxxxx>
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)
 
 




--
“If anyone thinks the words ‘government’ and ‘efficiency’ belong in the same sentence, we  have counseling available.”
- Sen. Paul Tsongas (D-MA)