C# Class ISE.FTFont

Font class wraper for displaying FreeType fonts in OpenGL.
Mostrar archivo Open project: colgreen/box2dx Class Usage Examples

Public Properties

Property Type Description
FT_ALIGN FTFontAlign

Public Methods

Method Description
Dispose ( ) : void

Dispose of the font

DisposeFreeType ( ) : void

Dispose of the FreeType library

FTFont ( string resourcefilename, int &Success ) : System

Initialise the Font. Will Initialise the freetype library if not already done so

ftBeginFont ( ) : void

Initialise the OpenGL state necessary fo rendering the font properly

ftClearFont ( ) : void

Clear all OpenGL-related structures.

ftEndFont ( ) : void

Restore the OpenGL state to what it was prior to starting to draw the font

ftExtent ( string &text ) : float

Return the horizontal extent (width),in pixels, of a given font string

ftGetGlyphOffset ( Char glyphchar ) : FTGlyphOffset

Return the Glyph offsets for the first character in "text"

ftInit ( ) : int

Initialise the FreeType library

ftRenderToTexture ( int fontsize, uint DPI ) : void

Render the font to a series of OpenGL textures (one per letter)

ftVersion ( int &Major, int &Minor, int &Patch ) : void

Return the version information for FreeType.

ftVersionString ( ) : string

Return the entire version information for FreeType as a String.

ftWrite ( string text ) : void

Custom GL "write" routine.

Private Methods

Method Description
CompileCharacterToTexture ( Tao.FreeType.FT_FaceRec face, int c ) : void
next_po2 ( int a ) : int

Method Details

Dispose() public method

Dispose of the font
public Dispose ( ) : void
return void

DisposeFreeType() public static method

Dispose of the FreeType library
public static DisposeFreeType ( ) : void
return void

FTFont() public method

Initialise the Font. Will Initialise the freetype library if not already done so
public FTFont ( string resourcefilename, int &Success ) : System
resourcefilename string Path to the external font file
Success int Returns 0 if successful
return System

ftBeginFont() public method

Initialise the OpenGL state necessary fo rendering the font properly
public ftBeginFont ( ) : void
return void

ftClearFont() public method

Clear all OpenGL-related structures.
public ftClearFont ( ) : void
return void

ftEndFont() public method

Restore the OpenGL state to what it was prior to starting to draw the font
public ftEndFont ( ) : void
return void

ftExtent() public method

Return the horizontal extent (width),in pixels, of a given font string
public ftExtent ( string &text ) : float
text string
return float

ftGetGlyphOffset() public method

Return the Glyph offsets for the first character in "text"
public ftGetGlyphOffset ( Char glyphchar ) : FTGlyphOffset
glyphchar Char
return FTGlyphOffset

ftInit() public static method

Initialise the FreeType library
public static ftInit ( ) : int
return int

ftRenderToTexture() public method

Render the font to a series of OpenGL textures (one per letter)
public ftRenderToTexture ( int fontsize, uint DPI ) : void
fontsize int size of the font
DPI uint dots-per-inch setting
return void

ftVersion() public static method

Return the version information for FreeType.
public static ftVersion ( int &Major, int &Minor, int &Patch ) : void
Major int Major Version
Minor int Minor Version
Patch int Patch Number
return void

ftVersionString() public static method

Return the entire version information for FreeType as a String.
public static ftVersionString ( ) : string
return string

ftWrite() public method

Custom GL "write" routine.
public ftWrite ( string text ) : void
text string /// The text to print. ///
return void

Property Details

FT_ALIGN public_oe property

Font alignment public parameter
public FTFontAlign FT_ALIGN
return FTFontAlign