Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FTCharmap Class Reference

#include <FTCharmap.h>


Public Member Functions

 FTCharmap (FTFace *face)
 Constructor.

virtual ~FTCharmap ()
 Destructor.

FT_Encoding Encoding () const
 Queries for the current character map code.

bool CharMap (FT_Encoding encoding)
 Sets the character map for the face.

unsigned int GlyphListIndex (const unsigned int characterCode)
 Get the FTGlyphContainer index of the input character.

unsigned int FontIndex (const unsigned int characterCode)
 Get the font glyph index of the input character.

void InsertIndex (const unsigned int characterCode, const unsigned int containerIndex)
 Set the FTGlyphContainer index of the character code.

FT_Error Error () const
 Queries for errors.


Constructor & Destructor Documentation

FTCharmap::FTCharmap FTFace face  ) 
 

Constructor.

Definition at line 5 of file FTCharmap.cpp.

FTCharmap::~FTCharmap  )  [virtual]
 

Destructor.

Definition at line 18 of file FTCharmap.cpp.

References FTCharToGlyphIndexMap::clear().


Member Function Documentation

bool FTCharmap::CharMap FT_Encoding  encoding  ) 
 

Sets the character map for the face.

Valid encodings as at Freetype 2.0.4 ft_encoding_none ft_encoding_symbol ft_encoding_unicode ft_encoding_latin_2 ft_encoding_sjis ft_encoding_gb2312 ft_encoding_big5 ft_encoding_wansung ft_encoding_johab ft_encoding_adobe_standard ft_encoding_adobe_expert ft_encoding_adobe_custom ft_encoding_apple_roman

Parameters:
encoding the Freetype encoding symbol. See above.
Returns:
true if charmap was valid and set correctly. If the requested encoding is unavailable it will be set to ft_encoding_none.

Definition at line 24 of file FTCharmap.cpp.

References FTCharToGlyphIndexMap::clear().

Referenced by FTGlyphContainer::CharMap().

FT_Encoding FTCharmap::Encoding  )  const [inline]
 

Queries for the current character map code.

Returns:
The current character map code.

Definition at line 47 of file FTCharmap.h.

FT_Error FTCharmap::Error  )  const [inline]
 

Queries for errors.

Returns:
The current error code. Zero means no error.

Definition at line 107 of file FTCharmap.h.

Referenced by FTGlyphContainer::CharMap().

unsigned int FTCharmap::FontIndex const unsigned int  characterCode  ) 
 

Get the font glyph index of the input character.

Parameters:
characterCode The character code of the requested glyph in the current encoding eg apple roman.
Returns:
The glyph index for the character.

Definition at line 53 of file FTCharmap.cpp.

Referenced by FTGlyphContainer::Advance(), FTGlyphContainer::FontIndex(), and FTGlyphContainer::Render().

unsigned int FTCharmap::GlyphListIndex const unsigned int  characterCode  ) 
 

Get the FTGlyphContainer index of the input character.

Parameters:
characterCode The character code of the requested glyph in the current encoding eg apple roman.
Returns:
The FTGlyphContainer index for the character or zero if it wasn't found

Definition at line 47 of file FTCharmap.cpp.

References FTCharToGlyphIndexMap::find().

Referenced by FTGlyphContainer::Advance(), FTGlyphContainer::BBox(), FTGlyphContainer::Glyph(), and FTGlyphContainer::Render().

void FTCharmap::InsertIndex const unsigned int  characterCode,
const unsigned int  containerIndex
 

Set the FTGlyphContainer index of the character code.

Parameters:
characterCode The character code of the requested glyph in the current encoding eg apple roman.
containerIndex The index into the FTGlyphContainer of the character code.

Definition at line 59 of file FTCharmap.cpp.

References FTCharToGlyphIndexMap::insert().

Referenced by FTGlyphContainer::Add().


The documentation for this class was generated from the following files:
Generated on Sun Dec 5 22:24:06 2004 for FTGL by doxygen 1.3.6