SDL_ttf loading fonts from a buffer or RWop

Hey guys,
Has anyone found a good way to open a font with SDL_ttf using a buffer
rather than a real file on the system? Something like RWops?

OR is there a version of SDL_ttf that already uses RWops that I just
haven’t found?

Thanks.–

End of Rant.

Jimmy
Jimmy’s World (http://www.jimmysworld.org)
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020810/f4f66e95/attachment.pgp

Hey guys,
Has anyone found a good way to open a font with SDL_ttf using a buffer
rather than a real file on the system? Something like RWops?

OR is there a version of SDL_ttf that already uses RWops that I just
haven’t found?

I recieved a patch for it, I haven’t had time to integrate it yet though.
I’ll try to get to it soon.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hey guys,
Has anyone found a good way to open a font with SDL_ttf using a buffer
rather than a real file on the system? Something like RWops?

Yep, you got it.
The latest CVS version can load from an SDL_RWops stream:
TTF_OpenFontRW(SDL_RWFromMem(mem, size), 1, 18);

You can download the pre-release code from:
http://www.libsdl.org/cvs/SDL_ttf-2.0.6.tar.gz

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment