Tao.Sdl SDK Documentation

SdlTtf Methods

The methods of the SdlTtf class are listed below. For a complete list of SdlTtf class members, see the SdlTtf Members topic.

Public Static (Shared) Methods

TTF_ByteSwappedUNICODE This function tells the library whether UNICODE text is generally byteswapped. A UNICODE BOM character in a string will override this setting for the remainder of that string.
TTF_CloseFont Close an opened font file
TTF_FontAscent Get font max ascent (y above origin). Get the offset from the baseline to the top of the font This is a positive value, relative to the baseline.
TTF_FontDescent Get font min descent (y below origin). Get the offset from the baseline to the bottom of the font This is a negative value, relative to the baseline.
TTF_FontFaceFamilyName Get current font face family name string.
TTF_FontFaceIsFixedWidth Get whether font is monospaced or not.
TTF_FontFaces Get the number of faces of the font
TTF_FontFaceStyleName Get current font face style name string.
TTF_FontHeight Get the total height of the font - usually equal to point size
TTF_FontLineSkip Get the recommended spacing between lines of text for this font.
TTF_GetError Get the current error string
TTF_GetFontStyle Retrieve the font style This font style is implemented by modifying the font glyphs, and doesn't reflect any inherent properties of the truetype font file.
TTF_GlyphMetrics Get individual font glyph metrics
TTF_Init Initialize the TTF engine - returns 0 if successful, -1 on error
TTF_Linked_Version Using this you can compare the runtime version to the version that you compiled with.
TTF_OpenFont Open a font file and create a font of the specified point size. Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
TTF_OpenFontIndex Open a font file and create a font of the specified point size. Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
TTF_OpenFontIndexRW Open a font file using RWOps with an index and create a font of the specified point size. Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
TTF_OpenFontRW Open a font file suing RWOps and create a font of the specified point size. Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
TTF_Quit De-initialize the TTF engine
TTF_RenderGlyph_Blended Draw a UNICODE glyph in blended mode.
TTF_RenderGlyph_Shaded Draw a UNICODE glyph in shaded mode.
TTF_RenderGlyph_Solid Draw a UNICODE glyph in solid mode.
TTF_RenderText_Blended Draw LATIN1 text in blended mode.
TTF_RenderText_Shaded Draw LATIN1 text in shaded mode.
TTF_RenderText_Solid Draw LATIN1 text in solid mode.
TTF_RenderUNICODE_Blended Draw UNICODE text in blended mode.
TTF_RenderUNICODE_Shaded Draw UNICODE text in shaded mode.
TTF_RenderUNICODE_Solid Draw UNICODE text in solid mode.
TTF_RenderUTF8_Blended Draw UTF8 text in blended mode.
TTF_RenderUTF8_Shaded Draw UTF8 text in shaded mode.
TTF_RenderUTF8_Solid Draw UTF8 text in solid mode.
TTF_SetError Set the current error string
TTF_SetFontStyle Set the font style This font style is implemented by modifying the font glyphs, and doesn't reflect any inherent properties of the truetype font file.
TTF_SizeText Get size of LATIN1 text string as would be rendered
TTF_SizeUNICODE Get size of UNICODE text string as would be rendered
TTF_SizeUTF8 Get size of UTF8 text string as would be rendered
TTF_VERSION This method can be used to fill a version structure with the compile-time version of the SDL_ttf library.
TTF_WasInit Check if the TTF engine is initialized.

Public Instance Methods

Equals (inherited from Object) 
GetHashCode (inherited from Object) 
GetType (inherited from Object) 
ToString (inherited from Object) 

See Also

SdlTtf Class | Tao.Sdl Namespace