#include <FTGlyphContainer.h>
Public Member Functions | |
| FTGlyphContainer (FTFace *face) | |
| ~FTGlyphContainer () | |
| bool | CharMap (FT_Encoding encoding) |
| unsigned int | FontIndex (const unsigned int characterCode) const |
| void | Add (FTGlyph *glyph, const unsigned int characterCode) |
| FTGlyph * | Glyph (const unsigned int characterCode) const |
| FTBBox | BBox (const unsigned int characterCode) const |
| float | Advance (const unsigned int characterCode, const unsigned int nextCharacterCode) |
| FTPoint | Render (const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition) |
| FT_Error | Error () const |
| FTGlyphContainer (FTFace *face) | |
| ~FTGlyphContainer () | |
| bool | CharMap (FT_Encoding encoding) |
| unsigned int | FontIndex (const unsigned int characterCode) const |
| void | Add (FTGlyph *glyph, const unsigned int characterCode) |
| FTGlyph * | Glyph (const unsigned int characterCode) const |
| FTBBox | BBox (const unsigned int characterCode) const |
| float | Advance (const unsigned int characterCode, const unsigned int nextCharacterCode) |
| FTPoint | Render (const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition) |
| FT_Error | Error () const |
Private Types | |
| typedef FTVector< FTGlyph * > | GlyphVector |
| typedef FTVector< FTGlyph * > | GlyphVector |
Private Attributes | |
| FTFace * | face |
| FTCharmap * | charMap |
| GlyphVector | glyphs |
| FT_Error | err |
| FTFace * | face |
| FTCharmap * | charMap |
Definition at line 22 of file FTGlyphContainer.h.
typedef FTVector<FTGlyph*> FTGlyphContainer::GlyphVector [private] |
Definition at line 24 of file FTGlyphContainer.h.
typedef FTVector<FTGlyph*> FTGlyphContainer::GlyphVector [private] |
Definition at line 24 of file FTGlyphContainer.h.
| FTGlyphContainer::FTGlyphContainer | ( | FTFace * | face | ) |
Constructor
| face | The Freetype face |
Definition at line 7 of file FTGlyphContainer.cxx.
References charMap, face, glyphs, NULL, and FTVector< FT_VECTOR_ITEM_TYPE >::push_back().
| FTGlyphContainer::~FTGlyphContainer | ( | ) |
Destructor
Definition at line 16 of file FTGlyphContainer.cxx.
References FTVector< FT_VECTOR_ITEM_TYPE >::begin(), charMap, FTVector< FT_VECTOR_ITEM_TYPE >::clear(), FTVector< FT_VECTOR_ITEM_TYPE >::end(), and glyphs.
| FTGlyphContainer::FTGlyphContainer | ( | FTFace * | face | ) |
Constructor
| face | The Freetype face |
| FTGlyphContainer::~FTGlyphContainer | ( | ) |
Destructor
| bool FTGlyphContainer::CharMap | ( | FT_Encoding | encoding | ) |
Sets the character map for the face.
| encoding | the Freetype encoding symbol. See above. |
true if charmap was valid and set correctly Definition at line 29 of file FTGlyphContainer.cxx.
References FTCharmap::CharMap(), charMap, err, FTCharmap::Error(), and result().
Referenced by FTFont::CharMap().
| unsigned int FTGlyphContainer::FontIndex | ( | const unsigned int | characterCode | ) | const |
Get the font index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
Definition at line 37 of file FTGlyphContainer.cxx.
References charMap, and FTCharmap::FontIndex().
Referenced by FTFont::CheckGlyph().
| void FTGlyphContainer::Add | ( | FTGlyph * | glyph, | |
| const unsigned int | characterCode | |||
| ) |
Adds a glyph to this glyph list.
| glyph | The FTGlyph to be inserted into the container | |
| characterCode | The char code of the glyph NOT the glyph index. |
Definition at line 43 of file FTGlyphContainer.cxx.
References charMap, glyphs, FTCharmap::InsertIndex(), FTVector< FT_VECTOR_ITEM_TYPE >::push_back(), and FTVector< FT_VECTOR_ITEM_TYPE >::size().
Referenced by FTFont::CheckGlyph().
| FTGlyph * FTGlyphContainer::Glyph | ( | const unsigned int | characterCode | ) | const |
Get a glyph from the glyph list
| characterCode | The char code of the glyph NOT the glyph index |
null is it hasn't been loaded. Definition at line 50 of file FTGlyphContainer.cxx.
References charMap, FTCharmap::GlyphListIndex(), and glyphs.
Referenced by FTFont::CheckGlyph().
| FTBBox FTGlyphContainer::BBox | ( | const unsigned int | characterCode | ) | const |
Get the bounding box for a character.
| characterCode | The char code of the glyph NOT the glyph index |
Definition at line 57 of file FTGlyphContainer.cxx.
References charMap, FTCharmap::GlyphListIndex(), and glyphs.
Referenced by FTFont::BBox().
| float FTGlyphContainer::Advance | ( | const unsigned int | characterCode, | |
| const unsigned int | nextCharacterCode | |||
| ) |
Returns the kerned advance width for a glyph.
| characterCode | glyph index of the character | |
| nextCharacterCode | the next glyph in a string |
Definition at line 63 of file FTGlyphContainer.cxx.
References charMap, face, FTCharmap::FontIndex(), FTCharmap::GlyphListIndex(), glyphs, FTFace::KernAdvance(), width, and FTPoint::X().
Referenced by FTFont::Advance(), and FTFont::BBox().
| FTPoint FTGlyphContainer::Render | ( | const unsigned int | characterCode, | |
| const unsigned int | nextCharacterCode, | |||
| FTPoint | penPosition | |||
| ) |
Renders a character
| characterCode | the glyph to be Rendered | |
| nextCharacterCode | the next glyph in the string. Used for kerning. | |
| penPosition | the position to Render the glyph |
Definition at line 75 of file FTGlyphContainer.cxx.
References charMap, FTFace::Error(), face, FTCharmap::FontIndex(), FTCharmap::GlyphListIndex(), glyphs, and FTFace::KernAdvance().
Referenced by FTFont::Render().
| FT_Error FTGlyphContainer::Error | ( | ) | const [inline] |
Queries the Font for errors.
Definition at line 102 of file FTGlyphContainer.h.
Referenced by FTFont::CharMap().
| bool FTGlyphContainer::CharMap | ( | FT_Encoding | encoding | ) |
Sets the character map for the face.
| encoding | the Freetype encoding symbol. See above. |
true if charmap was valid and set correctly | unsigned int FTGlyphContainer::FontIndex | ( | const unsigned int | characterCode | ) | const |
Get the font index of the input character.
| characterCode | The character code of the requested glyph in the current encoding eg apple roman. |
| void FTGlyphContainer::Add | ( | FTGlyph * | glyph, | |
| const unsigned int | characterCode | |||
| ) |
Adds a glyph to this glyph list.
| glyph | The FTGlyph to be inserted into the container | |
| characterCode | The char code of the glyph NOT the glyph index. |
| FTGlyph* FTGlyphContainer::Glyph | ( | const unsigned int | characterCode | ) | const |
Get a glyph from the glyph list
| characterCode | The char code of the glyph NOT the glyph index |
null is it hasn't been loaded. | FTBBox FTGlyphContainer::BBox | ( | const unsigned int | characterCode | ) | const |
Get the bounding box for a character.
| characterCode | The char code of the glyph NOT the glyph index |
| float FTGlyphContainer::Advance | ( | const unsigned int | characterCode, | |
| const unsigned int | nextCharacterCode | |||
| ) |
Returns the kerned advance width for a glyph.
| characterCode | glyph index of the character | |
| nextCharacterCode | the next glyph in a string |
| FTPoint FTGlyphContainer::Render | ( | const unsigned int | characterCode, | |
| const unsigned int | nextCharacterCode, | |||
| FTPoint | penPosition | |||
| ) |
Renders a character
| characterCode | the glyph to be Rendered | |
| nextCharacterCode | the next glyph in the string. Used for kerning. | |
| penPosition | the position to Render the glyph |
| FT_Error FTGlyphContainer::Error | ( | ) | const [inline] |
Queries the Font for errors.
Definition at line 102 of file FTGlyphContainer.h.
FTFace* FTGlyphContainer::face [private] |
The FTGL face
Definition at line 108 of file FTGlyphContainer.h.
Referenced by Advance(), FTGlyphContainer(), and Render().
FTCharmap* FTGlyphContainer::charMap [private] |
The Character Map object associated with the current face
Definition at line 113 of file FTGlyphContainer.h.
Referenced by Add(), Advance(), BBox(), CharMap(), FontIndex(), FTGlyphContainer(), Glyph(), Render(), and ~FTGlyphContainer().
GlyphVector FTGlyphContainer::glyphs [private] |
A structure to hold the glyphs
Definition at line 118 of file FTGlyphContainer.h.
Referenced by Add(), Advance(), BBox(), FTGlyphContainer(), Glyph(), Render(), and ~FTGlyphContainer().
FT_Error FTGlyphContainer::err [private] |
Current error code. Zero means no error.
Definition at line 123 of file FTGlyphContainer.h.
Referenced by CharMap().
FTFace* FTGlyphContainer::face [private] |
The FTGL face
Definition at line 108 of file FTGlyphContainer.h.
FTCharmap* FTGlyphContainer::charMap [private] |
The Character Map object associated with the current face
Definition at line 113 of file FTGlyphContainer.h.
1.5.1