Difference between revisions of "SDL ttf"
(Undo revision 25280 by 46.33.241.195 (talk)) |
|
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 21:53, 29 August 2011
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 |
- This page is a stub. Please help RogueBasin by expanding it. Click here to edit this page.
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. ;-)