Jump to content
  • Advertisement
Sign in to follow this  
mrukki

Print text in SDL?

This topic is 3845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! Can somebody tell my how to print out text in SDL? I want the text to be in some normal font like Arial [wink] Thanks. Mrukki

Share this post


Link to post
Share on other sites
Advertisement
Your best bet would be to use SDL_ttf to generate SDL_Surfaces containing pre-rendered text which you can blit to the screen.

Share this post


Link to post
Share on other sites
Okey, I got SDL_ttf on my computer but I don't know how to use it :P
Can you give me a example?

Mrukki

Share this post


Link to post
Share on other sites
I'm sorry, don't have an example at hand. You would have to read through the documentation (if any) or though the header file which should have descriptions for each function. Also you might find SDL_ttf usage examples using google.

Share this post


Link to post
Share on other sites
Thanks everybody! I searched for "SDL_ttf" on google and found a good tutorial, so now I understand :)

Mrukki

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!