Better Font library than SDL_ttf

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
mv2112
Chaos Rift Junior
Chaos Rift Junior
Posts: 240
Joined: Sat Feb 20, 2010 4:15 am
Current Project: Java Tower Defence Game
Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
Programming Language of Choice: C/++, Java
Location: /usr/home/mv2112
Contact:

Better Font library than SDL_ttf

Post 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?
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Better Font library than SDL_ttf

Post 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).
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Better Font library than SDL_ttf

Post 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.
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
XianForce
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 767
Joined: Wed Oct 29, 2008 8:36 pm

Re: Better Font library than SDL_ttf

Post 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.
User avatar
mv2112
Chaos Rift Junior
Chaos Rift Junior
Posts: 240
Joined: Sat Feb 20, 2010 4:15 am
Current Project: Java Tower Defence Game
Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
Programming Language of Choice: C/++, Java
Location: /usr/home/mv2112
Contact:

Re: Better Font library than SDL_ttf

Post 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...
Post Reply