Page 1 of 1

Better Font library than SDL_ttf

Posted: Tue Jul 20, 2010 11:55 pm
by mv2112
Does anyone know a better font library than SDL_ttf? Something that is a little lighter and can resize fonts without having to reload. I was thinking about using TrueType but i cant figure out how to get a SDL_Surface out of it :oops: ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?

Re: Better Font library than SDL_ttf

Posted: Wed Jul 21, 2010 12:35 am
by Ginto8
mv2112 wrote:Does anyone know a better font library than SDL_ttf? Something that is a little lighter and can resize fonts without having to reload. I was thinking about using TrueType but i cant figure out how to get a SDL_Surface out of it :oops: ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?
use SDL_gfx to resize the surface if you want to have different sizes. That's similar to the opengl suggestion I had earlier, and it's how I'm doing my font engine (as in, I'm using opengl to have a similar effect).

Re: Better Font library than SDL_ttf

Posted: Wed Jul 21, 2010 9:22 am
by ibly31
Easy solution: stop using SDL. I know it sounds dumb, but I use to love SDL and then when I moved on to SFML and OpenGL I never looked back. Trust me, SFML is a lot better in pretty much every aspect than SDL.

/not trying to start a flame war.

Re: Better Font library than SDL_ttf

Posted: Wed Jul 21, 2010 10:21 am
by XianForce
ibly31 wrote:Easy solution: stop using SDL. I know it sounds dumb, but I use to love SDL and then when I moved on to SFML and OpenGL I never looked back. Trust me, SFML is a lot better in pretty much every aspect than SDL.

/not trying to start a flame war.
The problem is that SDL is generally slower than SFML... But once you incorporate OpenGL into both of these, the speed is virtually the same. As far as I know, SFML uses OpenGL to optimize it's rendering a bit. So if you want something faster, I definitely suggest SFML, because it has some low level power that OpenGL would offer, but it's abstracted, so you don't need to worry about a lot of stuff you otherwise would. Plus, SFML is modular, meaning you only use what you want, instead of having a general header such as SDL does (e.g. SDL.h).

The only thing I don't really like about SFML, is it's annoying to setup for me >.<. Having different DLLs for debug and release just annoys me... I guess that could be fixed with a better project structure though...


Also, I'm not an SFML fanboy. In fact, I used SFML once and saw that I could accomplish the same things with SDL and OpenGL (which I was much more familiar with). I don't believe there was anything to gain by switching to SFML since I was already using OpenGL. So yes, I'm an SDL fanboy =p.

But yeah, if your not willing/ready for the jump to OpenGL, I definitely recommend SFML =p.

Re: Better Font library than SDL_ttf

Posted: Thu Jul 22, 2010 7:49 pm
by mv2112
Ginto8 wrote:
mv2112 wrote:Does anyone know a better font library than SDL_ttf? Something that is a little lighter and can resize fonts without having to reload. I was thinking about using TrueType but i cant figure out how to get a SDL_Surface out of it :oops: ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?
use SDL_gfx to resize the surface if you want to have different sizes. That's similar to the opengl suggestion I had earlier, and it's how I'm doing my font engine (as in, I'm using opengl to have a similar effect).
I tried SDL_gfx but the quality was horrible.
ibly31 wrote:Easy solution: stop using SDL. I know it sounds dumb, but I use to love SDL and then when I moved on to SFML and OpenGL I never looked back. Trust me, SFML is a lot better in pretty much every aspect than SDL.

/not trying to start a flame war.
Can sfml easily resize surfaces or whatever is used to blit with?
Also, i dont know if sfml will work for the wii...