[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pygame font issues
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Pygame font issues
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Fri, 1 May 2009 09:13:37 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 30 Apr 2009 19:13:39 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kKv7HOdJJKvwVZ4uhgKYEfMRD5yzF9KkFAAXp8TW1ys=; b=PGt05a9WJCTZQitpi2tb/HbcYhk6FokK365+0GDLIcAx1eh2sQ68ZNC5bx0ywdDnB7 JsR+VAtrhW3CcXlW2WhpIU0n3j9rF88EMJoQtXsc21Y3zZJRHoTWMNojWQNs6g3kMHgo x81wxeJNwZHqcDPH9CNwkLcD8oYqy+FRQfmDs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=j56hh78y7E2u7VlzE49VROS++89XnHOwyl2KsNldGsQAJCBJbA+qfm8b272iXEVB/q uyDgw9jcLgfOeFUBzFPX1GKGoOraGUKXAitqJTWuss9kMnlh0/JgWNduzRElsTEJkWev 76g2hfcpajcIHsRlIbOLBXg69WLyAlpsv7y+s=
- In-reply-to: <200904302319.15523.pete@xxxxxxxxxxxxxxx>
- References: <200904302319.15523.pete@xxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
where is freesansbold.ttf on your system? It should be installed with pygame.
cheers,
On Fri, May 1, 2009 at 8:19 AM, Peter Chant <pete@xxxxxxxxxxxxxxx> wrote:
> 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
>