Main SDL TTF encapsulation class.
class TTF
ByteSwappedUNICODE() | Set default UNICODE byte swapping mode. |
Compiled_Version() | Determine the version used to compile this SDL TTF module. |
Init() | Initialize the TTF module |
InitAuto() | Initialize the TTF module and prepares for automatic de-initialization. |
Linked_Version() | Determine the version of the library that is currently linked. |
OpenFont() | Open a font file. |
Quit() | Turns off TTF system. |
WasInit() | Detects if the TTF subsystem was initialized. |
Main SDL TTF encapsulation class.
This class is the namespace for TTF functions of the SDL module. It contains the extensions provided by Falcon on the sdlttf module.
Set default UNICODE byte swapping mode.
TTF.ByteSwappedUNICODE( swap )
swap | Swapping mode. |
If swap is non-zero then UNICODE data is byte swapped relative to the CPU's native endianness. if swap zero, then do not swap UNICODE data, use the CPU's native endianness.
Determine the version used to compile this SDL TTF module.
TTF.Compiled_Version( )
Returns: | a three element array containing the major, minor and fix versions. |
Initialize the TTF module
TTF.Init( )
Raises: |
|
Does not require SDL.Init to be called before.
Initialize the TTF module and prepares for automatic de-initialization.
TTF.InitAuto( )
Raises: |
|
Does not require SDL.Init to be called before.
This method returns an object; when the object is destroyed by the GC, the library is de-initialized. To perform an application wide intialization with automatic de-initialization on quit, just store the return value of this method on a global variable of the main script.
Determine the version of the library that is currently linked.
TTF.Linked_Version( )
Returns: | a three element array containing the major, minor and fix versions. |
This function determines the version of the SDL_ttf library that is running on the system. As long as the interface is the same, it may be different from the version used to compile this module.
Open a font file.
TTF.OpenFont( fontname, ptsize, [index] )
fontname | File where the font is stored. | ||
ptsize | Size of the font that must be loaded. | ||
index | Face index in the file. | ||
Returns: | An instance of class TTFFont. | ||
Raises: |
|
Turns off TTF system.
TTF.Quit( )
This call shuts down the TTF extensions for SDL and resets system status. After a TTF quit, it is possible to reinitialize it.
Detects if the TTF subsystem was initialized.
TTF.WasInit( )
Returns: | True if the system was initialized, false otherwise. |