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

Re: [pygame] Please Help: SDL_ttf render STILL fails



Matt,

I think you need to "downgrade" freetype to version 2.1.2.
Bizarre, I know, but it seems that 2.1.3 is "broken" from
SDL_ttf's point of view, and 2.1.4 hasn't fixed it. I had
the same problem on RedHat 9, and the downgrade sorted it
out. Below is a message that I posted to the sdl-users list
at the time.

Hope this helps!

Lorcan

========== START OF SDL-USERS MESSAGE ============
Jesse Allen wrote:

> On Tue, May 20, 2003 at 10:12:41AM +0200, Carlos wrote:
>
>> /usr/include/SDL/ and libs are in /usr/lib/ ) and I don't really know my
>> freetype version... But do I need to know which freetype I have to load
>> windows .ttf file under linux ?
>
>
> You probably do in this case. SDL_ttf utilizes freetype to load and display ttf fonts. Depending on which distro you have, you can try looking for a freetype package and see the version number. If you can't find it, you can check XFree86 as it might be included in there. You might want to try to install a newer/older version of freetype, depending on the situation. If you can't figure it out still, you might need to read the SDL_ttf code for the render function and make sure it is working alright.


This sounds suspiciously like a problem I just had, after installing RedHat 9. In my case, it *was* the freetype version that caused it.
For me, "showfont" worked fine, but pygame.font (a python wrapper
for SDL_ttf) didn't. I didn't try using SDL_ttf directly from C, so
maybe this isn't the same problem.

RedHat 9 ships with freetype 2.1.3. Eventually, I found this hint
on the SDL_ttf webpage (http://www.libsdl.org/projects/SDL_ttf/):

"Requires:
The latest stable release of SDL 1.2, FreeType 2.0 or newer
(except FreeType 2.1.3)"

Note the bit in parentheses... :)

Eventually, I tracked down an RPM for FreeType 2.1.2 on RedHat's
ftp server - I think it shipped with RedHat 8.0? Anyway, I had to
force it past rpm's dependency checking with something like

rpm -U --force --nodeps freetype-2.1.2-7.i386.rpm

although I think "--oldpackage" might have worked instead of "--force"; I also installed the corresponding freetype-devel RPM, and "--nodeps --oldpackage" worked for that one.

Be warned: my system seems stable right now, and SDL_ttf seems to be working - pygame.font is now fine, at any rate. ****BUT*** I haven't even been through a reboot since I did this, so anything could happen yet. If your machine explodes, it's not my fault! :)

Hope this helps,

Lorcan Hamill

P.S.: There is now a version 2.1.4 of FreeType, but I wasn't feeling brave enough to try it. Does anyone know if it works with SDL_ttf? I'm not sure if the warning on the SDL_ttf webpage has been updated since 2.1.4 was released...

========== END OF SDL-USERS MESSAGE ============

Matt Ficken wrote:
Whenever I try rendering fonts with SDL_ttf I get the error message "SDL_ttf render failed".

I have installed SDL-1.2 and pygame-1.5.6 and have upgraded to SDL_ttf-2.0.6
and freetype-2.1.4 (latest version, had 2.1.3)

I am running Redhat 9(i686).

Even after upgrading SDL_ttf and freetype, I still get the same message.


----- Original Message -----
From: theGREENzebra <tgz@orotech.net>
Date: Fri, 20 Jun 2003 18:34:19 -0400
To: pygame-users@seul.org
Subject: Re: [pygame] SDL_ttf render failed


I would like to be able to use true type fonts with pygame.
I tried running the example script 'fonty.py' that comes with the
pygame documentation but I get the error message "SDL_ttf render failed".
I also get the same error message if I try using pygame.font.render.
I have installed SDL-1.2, SDL_ttf-2.0.5 and pygame-1.5.6
You need to upgrade to SDL_ttf 2.0.6, and optionally, the latest freetype, if upgrading SDL_ttf doesn't fix the problem.

Brendan
--
* tgz@orotech.net * http://clickass.org * ICQ# 1107012 * AIM/Yahoo: theGREENzebra * http://mp3.com/thegreenzebra
-----GEEK CODE 3.12-----
GCM/CS/IT/MU d? s: a22 C++++ UL++++ P+ L+++>$ E---- W++ N+ o K- w---$ O- M V-- PS+ PE Y+ PGP- t++(+++) 5- X R tv(+) b+(-) DI+++ D+ G++ e h++ r+(---) y+ UF*++