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/):
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,
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…