Difference between revisions of "SDL ttf"

From RogueBasin
Jump to navigation Jump to search
Line 1: Line 1:
{{library| name = SDL_ttf
{{library| name = SDL_tff
|developer = Sam Lantinga
|developer =  
|released =  
|released =  
|updated = 2.0
|updated =  
|dependencies = [[SDL]],FreeType
|dependencies = [[SDL]],FreeType
|status = Stable
|status =  
|licensing =  
|licensing =  
|language =  
|language =  
|platforms = [[Windows]], [[Linux]]
|platforms = [[Windows]], [[Linux]]
|site = http://www.libsdl.org/projects/SDL_ttf/
|site =  
}}{{stub}}
}}{{stub}}
=== 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. [http://jcatki.no-ip.org/SDL_ttf/ 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 [http://www.libsdl.org/projects/SDL_ttf/ 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. ;-)

Revision as of 18:54, 29 August 2011

SDL_tff
Library project
Developer
Released
Updated
Status
Licensing
P. Language
Platforms Windows, Linux
Dependencies SDL,FreeType
[ Official site of SDL_tff]