Jump to content
  • Advertisement
Sign in to follow this  

SDL_TTF

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

Hi, I would like to know if you always give the .ttf file with your games using SDL_TTF or not ? I think that fonts like Arial don't have to be included, but is there a constant to know the Windows path, to be sure that the font is going to be found ?

Share this post


Link to post
Share on other sites
Advertisement
They are usually in "C:\WINDOWS\Fonts". Also be careful if you redistribute font files. Many of them are copyrighted and cannot be redistributed with your programs.

I always download free fonts with licenses that allow you to redistribute them. Then I distribute them with my games.

Share this post


Link to post
Share on other sites
I always get parachute deployed error when I have forgot to include my .ttf file, that's why I always do it. Well, that's probably because I don't link to the fonts dir in windows, but the folder where the game is located.

Share this post


Link to post
Share on other sites
You can get the Windows or System directories by using the GetWindowsDirectory() or GetSystemDirectory() system calls. However, it's best to just package your fonts with your apps.

Share this post


Link to post
Share on other sites
In order to be multiplatform compliant with SDL you have to have to have your fonts bundled with your application and preferably in the same directory as your application or use RWops since SDL_TTF doesn't seem to know where to look on different platforms to find the appropriate font files. Also avoid using system fonts becuase, as Simian Man noted, there are legal issues involved in redistributing copyrighted fonts.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!