Class TTF[in True Type]

Main SDL TTF encapsulation class.

class TTF

more...

Summary

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.

Detailed description

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.

Methods

ByteSwappedUNICODE()

Set default UNICODE byte swapping mode.

TTF.ByteSwappedUNICODE( swap )

swapSwapping 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.

Compiled_Version()

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.

Init()

Initialize the TTF module

TTF.Init( )

Raises:
SDLErroron initialization failure

Does not require SDL.Init to be called before.

InitAuto()

Initialize the TTF module and prepares for automatic de-initialization.

TTF.InitAuto( )

Raises:
SDLErroron initialization failure

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.

Linked_Version()

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.

OpenFont()

Open a font file.

TTF.OpenFont( fontname, ptsize, [index] )

fontnameFile where the font is stored.
ptsizeSize of the font that must be loaded.
indexFace index in the file.
Returns: An instance of class TTFFont.
Raises:
SDLErrorif the font cannot be loaded.

Quit()

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.

WasInit()

Detects if the TTF subsystem was initialized.

TTF.WasInit( )

Returns:True if the system was initialized, false otherwise.

Made with faldoc 2.0.0