Jump to content
  • Advertisement
Sign in to follow this  
Feidias

SDL font drawing

This topic is 5218 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

First of all I'm not trying to find a font library for SDL, but trying to figure out the fastest way to draw fonts. For the routine I need both background and font color changes, so using a simple bitmap is not the answer. I'm planning to draw a font-sized background rectangle and then drawing a font pixel by pixel over it, using a mask for font shape. It's probably slow, and for this reason I'm wondering is there a faster way to do it?

Share this post


Link to post
Share on other sites
Advertisement
Try SDL_TTF. I know you said you didn't want to use a font lib, but it is either this or using a palletized image...

Share this post


Link to post
Share on other sites
hum... look at the code !?

Or better, read the RFC (or any information about the file format of ttf file). You should get some enlightment about how to draw them !

Karl.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!