benang | 22 Nov 2006 09:28
Picon

SDL_ttf sometimes can't be rendered to image

Hi, in my application I used SDL_ttf with FreeSansBold.ttf from KDE (I
think). The funny thing is sometimes SDL_ttf can't render and make a
string surface. But if I restarted (sometimes numerous time) the
application again, it can make a surface. I used "TTF_RenderText_Solid" to
render the string. How can this be? Can anybody help me here? Thanks.

Fare thee well,
Bawenang R. P. P.

----------------

"I live for my dream. And my dream is to live my life to the fullest."
andreas | 22 Nov 2006 11:30
Picon

Re: SDL_ttf sometimes can't be rendered to image

Which platform are you using?
Seems to work fine on Windows with SDL 1.2.11 and SDL_ttf 2.0.8.

/a

benang <at> cs.its.ac.id wrote:
> Hi, in my application I used SDL_ttf with FreeSansBold.ttf from KDE (I
> think). The funny thing is sometimes SDL_ttf can't render and make a
> string surface. But if I restarted (sometimes numerous time) the
> application again, it can make a surface. I used "TTF_RenderText_Solid" to
> render the string. How can this be? Can anybody help me here? Thanks.
> 
benang | 23 Nov 2006 02:06
Picon

Re: SDL_ttf sometimes can't be rendered to image

I'm using Linux SuSE 10.0 with SDL 1.2.11 and SDL_ttf 2.0.8.

andreas said:
> Which platform are you using?
> Seems to work fine on Windows with SDL 1.2.11 and SDL_ttf 2.0.8.
>
> /a
>
> benang <at> cs.its.ac.id wrote:
>> Hi, in my application I used SDL_ttf with FreeSansBold.ttf from KDE (I
>> think). The funny thing is sometimes SDL_ttf can't render and make a
>> string surface. But if I restarted (sometimes numerous time) the
>> application again, it can make a surface. I used "TTF_RenderText_Solid"
>> to
>> render the string. How can this be? Can anybody help me here? Thanks.
>>

Fare thee well,
Bawenang R. P. P.

----------------

"I live for my dream. And my dream is to live my life to the fullest."
John Popplewell | 23 Nov 2006 13:29
Picon
Picon
Favicon

Re: SDL_ttf sometimes can't be rendered to image

On Thu, Nov 23, 2006 at 08:06:01AM +0700, benang <at> cs.its.ac.id wrote:
> I'm using Linux SuSE 10.0 with SDL 1.2.11 and SDL_ttf 2.0.8.

I found a similar problem on Windows which I could reproduce using the
showfont test program:
http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL_ttf/showfont.c?revision=2429

If I used the -solid switch, then it would only work if the string
contained no spaces:

Ok:
showfont.exe -solid c:\WINDOWS\Fonts\arial.ttf 32 "Hello!"
Font is generally 36 big, and string is 36 big

Broken:
showfont.exe -solid c:\WINDOWS\Fonts\arial.ttf 32 "Hello World!"
Couldn't render text:

It turned out to be related to the version of freetype used. All ok with
freetype-2.1.10, above problem with freetype-2.2.1,

regards,
John.

> 
> andreas said:
> > Which platform are you using?
> > Seems to work fine on Windows with SDL 1.2.11 and SDL_ttf 2.0.8.
> >
> > /a
(Continue reading)

benang | 24 Nov 2006 02:22
Picon

Re: SDL_ttf sometimes can't be rendered to image

How do I know what type the freetype was?

John Popplewell said:
> On Thu, Nov 23, 2006 at 08:06:01AM +0700, benang <at> cs.its.ac.id wrote:
>> I'm using Linux SuSE 10.0 with SDL 1.2.11 and SDL_ttf 2.0.8.
>
> I found a similar problem on Windows which I could reproduce using the
> showfont test program:
> http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL_ttf/showfont.c?revision=2429
>
> If I used the -solid switch, then it would only work if the string
> contained no spaces:
>
> Ok:
> showfont.exe -solid c:\WINDOWS\Fonts\arial.ttf 32 "Hello!"
> Font is generally 36 big, and string is 36 big
>
> Broken:
> showfont.exe -solid c:\WINDOWS\Fonts\arial.ttf 32 "Hello World!"
> Couldn't render text:
>
> It turned out to be related to the version of freetype used. All ok with
> freetype-2.1.10, above problem with freetype-2.2.1,
>
> regards,
> John.
>

Fare thee well,
Bawenang R. P. P.
(Continue reading)

John Popplewell | 24 Nov 2006 04:26
Picon
Picon
Favicon

Re: SDL_ttf sometimes can't be rendered to image

On Fri, Nov 24, 2006 at 08:22:57AM +0700, benang <at> cs.its.ac.id wrote:
> How do I know what type the freetype was?
Good question.

On Windows:
===========================================================================
it's tricky because freetype is statically linked into the
'SDL_ttf.dll'. A quick look didn't reveal any obvious freetype-related
strings.
===========================================================================

On Gentoo:
===========================================================================
$ emerge -p freetype

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] media-libs/freetype-2.1.10-r2 [2.1.10]

which shows my installed [version]. I need to do an Update there.

$ locate SDL_ttf.so
/usr/lib/libSDL_ttf.so

which shows where it is located.

$ ldd /usr/lib/libSDL_ttf.so
        linux-gate.so.1 =>  (0xffffe000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7f16000)
(Continue reading)

andreas | 24 Nov 2006 08:01
Picon

Re: SDL_ttf sometimes can't be rendered to image

John Popplewell wrote:
> On Windows:
> ===========================================================================
> it's tricky because freetype is statically linked into the
> 'SDL_ttf.dll'. A quick look didn't reveal any obvious freetype-related
> strings.
> ===========================================================================
> 
It is built against v2.1.10 if I remember correctly.

And the "space"-bug is fixed in their CVS according to this thread;

   http://www.mail-archive.com/freetype <at> nongnu.org/msg00802.html

So an alternate solution is to try the very latest cvs-snapshots and see if the problems are solved.

/a
John Popplewell | 24 Nov 2006 12:37
Picon
Picon
Favicon

Re: SDL_ttf sometimes can't be rendered to image

On Fri, Nov 24, 2006 at 08:01:57AM +0100, andreas wrote:
> John Popplewell wrote:
> > On Windows:
> > ===========================================================================
> > it's tricky because freetype is statically linked into the
> > 'SDL_ttf.dll'. A quick look didn't reveal any obvious freetype-related
> > strings.
> > ===========================================================================
> > 
> It is built against v2.1.10 if I remember correctly.
> 
> And the "space"-bug is fixed in their CVS according to this thread;
> 
>    http://www.mail-archive.com/freetype <at> nongnu.org/msg00802.html
> 
> So an alternate solution is to try the very latest cvs-snapshots and see if the problems are solved.
Thanks!

> 
> /a
> 
> _______________________________________________
> SDL mailing list
> SDL <at> libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 
benang | 24 Nov 2006 12:04
Picon

Re: SDL_ttf sometimes can't be rendered to image

Thanks alot. I'll try that.

andreas said:
> John Popplewell wrote:
>> On Windows:
>> ===========================================================================
>> it's tricky because freetype is statically linked into the
>> 'SDL_ttf.dll'. A quick look didn't reveal any obvious freetype-related
>> strings.
>> ===========================================================================
>>
> It is built against v2.1.10 if I remember correctly.
>
> And the "space"-bug is fixed in their CVS according to this thread;
>
>    http://www.mail-archive.com/freetype <at> nongnu.org/msg00802.html
>
> So an alternate solution is to try the very latest cvs-snapshots and see
> if the problems are solved.
>
> /a
>

Fare thee well,
Bawenang R. P. P.

----------------

"I live for my dream. And my dream is to live my life to the fullest."
(Continue reading)


Gmane