[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] py2exe and pygame fonts
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] py2exe and pygame fonts
- From: "andrew baker" <failrate@xxxxxxxxx>
- Date: Mon, 15 May 2006 19:16:57 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Mon, 15 May 2006 22:17:00 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Gsu5523lKkJ+E66AFU58tgda4I/RfSiDrBTY5/TKXft0PCatSTNU7msoMXHjs80JkuligfOiNFhcLj5JM8e5+7wrtz2mHw0j1CIEovwgBdZ9iL8sYph+BhgRvSZUDqODfZ9eE5EkPvDoXvKGhj4HtHw2frdK6iUEekGD4QS7KjQ=
- In-reply-to: <44760406@minerva2.ex.ac.uk>
- References: <44760406@minerva2.ex.ac.uk>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Are you copying the font file to your distribution folder (dist/)? That's what was happening to me.
On 5/15/06, rld201 <
R.L.Davidson@xxxxxxxxxxxx> wrote:Dear all,
I am currently trying to use py2exe to package my pygame project for windows.
This works fine except....
my pygame program uses the pygame.font.Font functions to write to the display.
When I run the program through py2exe no flags are thrown, but when i then run
the .exe file it fails and the log reports:
Traceback (most recent call last):
File "EyeMouse.py", line 669, in ?
File "EyeMouse.py", line 665, in main
File "EyeMouse.py", line 397, in mainLoop
File "EyeMouse.py
", line 22, in __init__
File "EyeMouse.py", line 205, in __init__
File "VideoCapture.pyc", line 50, in __init__
File "PIL\ImageFont.pyc", line 231, in load_path
IOError: cannot find font file
I am trying to use the Times New Roman font. I have tried calling this using
pygame.font.SysFont, pygame.font.match_font, and finally storing the times.ttf
file locally and calling it directly using pygame.font.Font
. Each of these
methods work perfectly when running from the python environment, but when
packaged using py2exe the same log report results.
Do any of you know how i can get the fonts to be found by the packaged
distribution?
Any help greatfully appreciated.
Rob
--
Andrew Ulysses Baker
"failrate"