🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

SDL Your method for text

Started by
13 comments, last by sckoobs 19 years, 11 months ago
I personally use the freetype library (http://www.freetype.org/)in combination with FTGL (http://homepages.paradise.net.nz/henryj/code/), but, of course I use opengl under sdl, so if you are sticking with conventional sdl surfaces you'd be best with sdl_ttf as the other guys suggest, but i've never used it personally so I don't know much about it.
Advertisement
I personally drew out all the ansi characters i was gonna use, put them all in one big image, then used some inherited classes from my tile engine.
What about if you incorporate OpenGL into your SDL game? Doesn't OpenGL come with some font rendering functions? If you only need 2D fonts, which do you think would be more appropriate, OpenGL font functions or SDL_ttf functions???

Hero of Allacrost - A free, open-source 2D RPG in development.
Latest release June, 2015 - GameDev annoucement

Roots: that depends on what you are looking for, there are font libraries that render antialiased text, 3d geometery text, bitmap fonts... the lot, or there are simpler, lighter libraries that only do bitmap fonts for example. It really depends what you are looking for. Bitmap fonts are perfectly ok for just about any use, but characters in true type fonts are not restrained to one height and width as bitmap fonts are.

There are some font functions available under glut if your are using opengl but last I looked they are pretty limited.

This topic is closed to new replies.

Advertisement