#include <FTCharmap.h>
Public Member Functions | |
| FTCharmap (FTFace *face) | |
| virtual | ~FTCharmap () |
| FT_Encoding | Encoding () const |
| bool | CharMap (FT_Encoding encoding) |
| unsigned int | GlyphListIndex (const unsigned int characterCode) |
| unsigned int | FontIndex (const unsigned int characterCode) |
| void | InsertIndex (const unsigned int characterCode, const unsigned int containerIndex) |
| FT_Error | Error () const |
| FTCharmap (FTFace *face) | |
| virtual | ~FTCharmap () |
| FT_Encoding | Encoding () const |
| bool | CharMap (FT_Encoding encoding) |
| unsigned int | GlyphListIndex (const unsigned int characterCode) |
| unsigned int | FontIndex (const unsigned int characterCode) |
| void | InsertIndex (const unsigned int characterCode, const unsigned int containerIndex) |
| FT_Error | Error () const |
Private Types | |
| typedef FTCharToGlyphIndexMap | CharacterMap |
| typedef FTCharToGlyphIndexMap | CharacterMap |
Private Attributes | |
| FT_Encoding | ftEncoding |
| const FT_Face | ftFace |
| CharacterMap | charMap |
| FT_Error | err |
Definition at line 29 of file FTCharmap.h.
typedef FTCharToGlyphIndexMap FTCharmap::CharacterMap [private] |
A structure that maps glyph indices to character codes
< character code, face glyph index>
Definition at line 125 of file FTCharmap.h.
typedef FTCharToGlyphIndexMap FTCharmap::CharacterMap [private] |
A structure that maps glyph indices to character codes
< character code, face glyph index>
Definition at line 125 of file FTCharmap.h.
| FTCharmap::FTCharmap | ( | FTFace * | face | ) |
Constructor
Definition at line 5 of file FTCharmap.cxx.
References FT_FaceRec_::charmap, FT_FaceRec_::charmaps, FT_CharMapRec_::encoding, err, FT_Set_Charmap(), ftEncoding, and ftFace.
| FTCharmap::~FTCharmap | ( | ) | [virtual] |
Destructor
Definition at line 18 of file FTCharmap.cxx.
References charMap, and FTCharToGlyphIndexMap::clear().
| FTCharmap::FTCharmap | ( | FTFace * | face | ) |
Constructor
| virtual FTCharmap::~FTCharmap | ( | ) | [virtual] |
Destructor
| FT_Encoding FTCharmap::Encoding | ( | ) | const [inline] |
Queries for the current character map code.
Definition at line 47 of file FTCharmap.h.
| 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
| encoding | the Freetype encoding symbol. See above. |
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.cxx.
References charMap, FTCharToGlyphIndexMap::clear(), err, ft_encoding_none, FT_Select_Charmap(), ftEncoding, and ftFace.
Referenced by FTGlyphContainer::CharMap().
| unsigned int FTCharmap::GlyphListIndex | ( | const unsigned int | characterCode | ) |
Get the FTGlyphContainer index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
Definition at line 47 of file FTCharmap.cxx.
References charMap, and FTCharToGlyphIndexMap::find().
Referenced by FTGlyphContainer::Advance(), FTGlyphContainer::BBox(), FTGlyphContainer::Glyph(), and FTGlyphContainer::Render().
| unsigned int FTCharmap::FontIndex | ( | const unsigned int | characterCode | ) |
Get the font glyph index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
Definition at line 53 of file FTCharmap.cxx.
References FT_Get_Char_Index(), and ftFace.
Referenced by FTGlyphContainer::Advance(), FTGlyphContainer::FontIndex(), and FTGlyphContainer::Render().
| void FTCharmap::InsertIndex | ( | const unsigned int | characterCode, | |
| const unsigned int | containerIndex | |||
| ) |
Set the FTGlyphContainer index of the character code.
| 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.cxx.
References charMap, and FTCharToGlyphIndexMap::insert().
Referenced by FTGlyphContainer::Add().
| FT_Error FTCharmap::Error | ( | ) | const [inline] |
Queries for errors.
Definition at line 107 of file FTCharmap.h.
Referenced by FTGlyphContainer::CharMap().
| FT_Encoding FTCharmap::Encoding | ( | ) | const [inline] |
Queries for the current character map code.
Definition at line 47 of file FTCharmap.h.
| 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
| encoding | the Freetype encoding symbol. See above. |
true if charmap was valid and set correctly. If the requested encoding is unavailable it will be set to ft_encoding_none. | unsigned int FTCharmap::GlyphListIndex | ( | const unsigned int | characterCode | ) |
Get the FTGlyphContainer index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
| unsigned int FTCharmap::FontIndex | ( | const unsigned int | characterCode | ) |
Get the font glyph index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
| void FTCharmap::InsertIndex | ( | const unsigned int | characterCode, | |
| const unsigned int | containerIndex | |||
| ) |
Set the FTGlyphContainer index of the character code.
| 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. |
| FT_Error FTCharmap::Error | ( | ) | const [inline] |
Queries for errors.
Definition at line 107 of file FTCharmap.h.
FT_Encoding FTCharmap::ftEncoding [private] |
Current character map code.
Definition at line 113 of file FTCharmap.h.
Referenced by CharMap(), and FTCharmap().
const FT_Face FTCharmap::ftFace [private] |
The current Freetype face.
Definition at line 118 of file FTCharmap.h.
Referenced by CharMap(), FontIndex(), and FTCharmap().
CharacterMap FTCharmap::charMap [private] |
Definition at line 126 of file FTCharmap.h.
Referenced by CharMap(), GlyphListIndex(), InsertIndex(), and ~FTCharmap().
FT_Error FTCharmap::err [private] |
Current error code.
Definition at line 131 of file FTCharmap.h.
Referenced by CharMap(), and FTCharmap().
1.5.1