SDL ttf

From RogueBasin
Revision as of 23:53, 29 August 2011 by Nolithius (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
SDL_ttf
Library project
Developer Sam Lantinga
Released
Updated 2.0
Status Stable
Licensing
P. Language
Platforms Windows, Linux
Dependencies SDL,FreeType
Official site of SDL_ttf


About SDL_ttf

SDL_ttf is an SDL project allowing for display and manipulation of true type fonts.

Creating a SDL_ttf project with VC++

1. Add a "main.c" (or whatever) file and copy a simple SDL program into it. (e.g. the demonstration code here, or SDL_ttf Sample Code).

2. This requires SDL to be installed and linked to your project.

See SDL pages for details.

3. Download SDL_ttf-devel-2.0.9-VC8.zip and unzip.

4. The 'include' directory needs to be added to "Additional Include Directories".

Rather then add another directory I copied the contents of the SDL_ttf include directory to "C:\p\include" (See SDL instructions).

5. The 'lib' directory needs to be added to "Additional Library Directories".

Rather then add another directory I copied the contents of the SDL_ttf lib directory to "C:\p\include" (See SDL instructions).

6. SDL_ttf.lib needs to be added to the "Additional Dependencies".

See "Project -> Properites -> Linker -> Additional Dependencies".

7. Any font required needs to be in the project folder (e.g. "CircleOfDust.ttf" for the demo code linked above).

8. Compile and run the project.

N.B. The demo code linked above a) Needs CircleOfDust.ttf passed to it as a command line argument and b) Is buggy. Use better demo code if you can find it. ;-)

Personal tools