[pyddr-discuss] SDL_ttf render failed

Jonathan Doughty jwd_usenet at yahoo.com
Tue Dec 23 23:13:45 EST 2003


--- Joe Wreschnig <piman at debian.org> wrote:

> Thanks for figuring this out; someone in #pyddr was
> having a similar
> problem today, and I didn't know the cause. However,
> he was running
> Fedora Core 1, rather than RH 9. His problem was
> fixed by recompiling
> the SDL_ttf SRPM on the SDL_ttf homepage.
... 
> My best guess is, a RH9 / Fedora problem. It might
> be a Freetype or
> SDL_ttf problem.

Thanks; that wasn't quite enough for me to correct all
the
problems I had, but it was enough for me to hack my
way to a
solution..

Here, for the benefit of anyone else on this path, is
what I
did: I installed the SDL_ttf-2.0.6-1.src.rpm as
suggested, and
then did an rpmbuild -bi on that.  But right out of
the box the
compile was giving me:
 SDL_ttf.c: In function `TTF_OpenFontIndexRW':
 SDL_ttf.c:276: `ft_open_stream' undeclared (first use
in this function)

Poking around in the freetype.h file that came with
the
freetype-2.1.3-6.i386.rpm I found that it defined
FT_OPEN_STREAM
but not ft_open_stream.  And looking through the
freetype.h that
comes with current 'stable' freetype 2.1.5, I find:
  /*    ft_open_stream      :: Deprecated; use
@FT_OPEN_STREAM instead.    */

Looking at the CVS sources for SDL_ttf on libsdl.org
would seem
to indicate that SDL_ttf.c has undergone a lot of
revisions since
the one in SDL_ttf-2.0.6.

As a result, I didn't want to go too bleeding edge
with all the
SDL and freetype libraries.

So I hacked
 	font->args.flags = FT_OPEN_STREAM;
from 
	font->args.flags = ft_open_stream;
in the sources for SDL_ttf.c, rebuilt myself a rpm,
and voila,
pydance seems to be working; at least I can now take
it through
the introductory tutorial.  (I have to wait until my
daughter is
out of the house to give it more thorough testing;
this isn't
for me mind you, it is part of a Linux-based,
Christmas gift DDR
set-up for her.  Shhh.)

One oddity I noticed in some initial testing: the
pydance window
doesn't seem to display any cursor when the mouse is
over that
window.  Expected? 
-- 
Jonathan Doughty


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/



More information about the pyddr-discuss mailing list