Better Font library than SDL_ttf
Moderator: Coders of Rage
- mv2112
- 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
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 ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?
- Ginto8
- 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
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).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 ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?
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.
- ibly31
- 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
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.
/not trying to start a flame war.
Website/Tumblr
My Projects
The best thing about UDP jokes is that I don’t care if you get them or not.
Re: Better Font library than SDL_ttf
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).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 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.
- mv2112
- 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
I tried SDL_gfx but the quality was horrible.Ginto8 wrote: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).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 ,even from looking at the SDL_ttf source, how would i convert FT_BITMAP to SDL_Surface? Or am i stuck with SDL_ttf?
Can sfml easily resize surfaces or whatever is used to blit with?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.
Also, i dont know if sfml will work for the wii...