#include <FTFace.h>
Public Member Functions | |
| FTFace (const char *fontFilePath) | |
| FTFace (const unsigned char *pBufferBytes, size_t bufferSizeInBytes) | |
| virtual | ~FTFace () |
| bool | Attach (const char *fontFilePath) |
| bool | Attach (const unsigned char *pBufferBytes, size_t bufferSizeInBytes) |
| FT_Face * | Face () const |
| const FTSize & | Size (const unsigned int size, const unsigned int res) |
| unsigned int | CharMapCount () |
| FT_Encoding * | CharMapList () |
| FTPoint | KernAdvance (unsigned int index1, unsigned int index2) |
| FT_GlyphSlot | Glyph (unsigned int index, FT_Int load_flags) |
| unsigned int | GlyphCount () const |
| FT_Error | Error () const |
| FTFace (const char *fontFilePath) | |
| FTFace (const unsigned char *pBufferBytes, size_t bufferSizeInBytes) | |
| virtual | ~FTFace () |
| bool | Attach (const char *fontFilePath) |
| bool | Attach (const unsigned char *pBufferBytes, size_t bufferSizeInBytes) |
| FT_Face * | Face () const |
| const FTSize & | Size (const unsigned int size, const unsigned int res) |
| unsigned int | CharMapCount () |
| FT_Encoding * | CharMapList () |
| FTPoint | KernAdvance (unsigned int index1, unsigned int index2) |
| FT_GlyphSlot | Glyph (unsigned int index, FT_Int load_flags) |
| unsigned int | GlyphCount () const |
| FT_Error | Error () const |
Private Attributes | |
| FT_Face * | ftFace |
| FTSize | charSize |
| int | numGlyphs |
| FT_Encoding * | fontEncodingList |
| bool | hasKerningTable |
| FT_Error | err |
| FT_Face * | ftFace |
| FT_Encoding * | fontEncodingList |
Definition at line 18 of file FTFace.h.
| FTFace::FTFace | ( | const char * | fontFilePath | ) |
Opens and reads a face file. Error is set.
| fontFilePath | font file path. |
Definition at line 6 of file FTFace.cxx.
References err, FT_HAS_KERNING, FT_New_Face(), ftFace, hasKerningTable, FTLibrary::Instance(), and numGlyphs.
| FTFace::FTFace | ( | const unsigned char * | pBufferBytes, | |
| size_t | bufferSizeInBytes | |||
| ) |
Read face data from an in-memory buffer. Error is set.
| pBufferBytes | the in-memory buffer | |
| bufferSizeInBytes | the length of the buffer in bytes |
Definition at line 25 of file FTFace.cxx.
References err, FT_New_Memory_Face(), ftFace, FTLibrary::Instance(), and numGlyphs.
| FTFace::~FTFace | ( | ) | [virtual] |
Destructor
Disposes of the current Freetype Face.
Definition at line 43 of file FTFace.cxx.
References FT_Done_Face(), and ftFace.
| FTFace::FTFace | ( | const char * | fontFilePath | ) |
Opens and reads a face file. Error is set.
| fontFilePath | font file path. |
| FTFace::FTFace | ( | const unsigned char * | pBufferBytes, | |
| size_t | bufferSizeInBytes | |||
| ) |
Read face data from an in-memory buffer. Error is set.
| pBufferBytes | the in-memory buffer | |
| bufferSizeInBytes | the length of the buffer in bytes |
| virtual FTFace::~FTFace | ( | ) | [virtual] |
Destructor
Disposes of the current Freetype Face.
| bool FTFace::Attach | ( | const char * | fontFilePath | ) |
Attach auxilliary file to font (e.g., font metrics).
| fontFilePath | auxilliary font file path. |
true if file has opened successfully. Definition at line 53 of file FTFace.cxx.
References err, FT_Attach_File(), and ftFace.
Referenced by FTFont::Attach().
| bool FTFace::Attach | ( | const unsigned char * | pBufferBytes, | |
| size_t | bufferSizeInBytes | |||
| ) |
Attach auxilliary data to font (e.g., font metrics) from memory
| pBufferBytes | the in-memory buffer | |
| bufferSizeInBytes | the length of the buffer in bytes |
true if file has opened successfully. Definition at line 60 of file FTFace.cxx.
References err, FT_Attach_Stream(), FT_OPEN_MEMORY, ftFace, and open.
| FT_Face* FTFace::Face | ( | ) | const [inline] |
| const FTSize & FTFace::Size | ( | const unsigned int | size, | |
| const unsigned int | res | |||
| ) |
Sets the char size for the current face.
This doesn't guarantee that the size was set correctly. Clients should check errors.
| size | the face size in points (1/72 inch) | |
| res | the resolution of the target device. |
FTSize object Definition at line 73 of file FTFace.cxx.
References charSize, FTSize::CharSize(), err, FTSize::Error(), and ftFace.
Referenced by FTFont::FaceSize().
| unsigned int FTFace::CharMapCount | ( | ) |
Get the number of character maps in this face.
Definition at line 82 of file FTFace.cxx.
Referenced by FTFont::CharMapCount(), and CharMapList().
| FT_Encoding * FTFace::CharMapList | ( | ) |
Get a list of character maps in this face.
Definition at line 88 of file FTFace.cxx.
References CharMapCount(), fontEncodingList, and size_t.
Referenced by FTFont::CharMapList().
| FTPoint FTFace::KernAdvance | ( | unsigned int | index1, | |
| unsigned int | index2 | |||
| ) |
Gets the kerning vector between two glyphs
Definition at line 101 of file FTFace.cxx.
References err, FT_Get_Kerning(), ft_kerning_unfitted, ftFace, hasKerningTable, FT_Vector_::x, x, FT_Vector_::y, and y.
Referenced by FTGlyphContainer::Advance(), and FTGlyphContainer::Render().
| FT_GlyphSlot FTFace::Glyph | ( | unsigned int | index, | |
| FT_Int | load_flags | |||
| ) |
Loads and creates a Freetype glyph.
Definition at line 121 of file FTFace.cxx.
References err, FT_Load_Glyph(), ftFace, and NULL.
Referenced by FTGLBitmapFont::MakeGlyph(), FTGLPixmapFont::MakeGlyph(), FTGLExtrdFont::MakeGlyph(), FTGLPolygonFont::MakeGlyph(), FTGLTextureFont::MakeGlyph(), and FTGLOutlineFont::MakeGlyph().
| unsigned int FTFace::GlyphCount | ( | ) | const [inline] |
Gets the number of glyphs in the current face.
Definition at line 108 of file FTFace.h.
Referenced by FTGLTextureFont::FaceSize(), and FTGLTextureFont::FTGLTextureFont().
| FT_Error FTFace::Error | ( | ) | const [inline] |
Queries for errors.
Definition at line 115 of file FTFace.h.
Referenced by FTFont::Attach(), FTFont::FaceSize(), FTFont::FTFont(), FTGLBitmapFont::MakeGlyph(), FTGLPixmapFont::MakeGlyph(), FTGLExtrdFont::MakeGlyph(), FTGLPolygonFont::MakeGlyph(), FTGLTextureFont::MakeGlyph(), FTGLOutlineFont::MakeGlyph(), and FTGlyphContainer::Render().
| bool FTFace::Attach | ( | const char * | fontFilePath | ) |
Attach auxilliary file to font (e.g., font metrics).
| fontFilePath | auxilliary font file path. |
true if file has opened successfully. | bool FTFace::Attach | ( | const unsigned char * | pBufferBytes, | |
| size_t | bufferSizeInBytes | |||
| ) |
Attach auxilliary data to font (e.g., font metrics) from memory
| pBufferBytes | the in-memory buffer | |
| bufferSizeInBytes | the length of the buffer in bytes |
true if file has opened successfully. | FT_Face* FTFace::Face | ( | ) | const [inline] |
| const FTSize& FTFace::Size | ( | const unsigned int | size, | |
| const unsigned int | res | |||
| ) |
Sets the char size for the current face.
This doesn't guarantee that the size was set correctly. Clients should check errors.
| size | the face size in points (1/72 inch) | |
| res | the resolution of the target device. |
FTSize object | unsigned int FTFace::CharMapCount | ( | ) |
Get the number of character maps in this face.
| FT_Encoding* FTFace::CharMapList | ( | ) |
Get a list of character maps in this face.
| FTPoint FTFace::KernAdvance | ( | unsigned int | index1, | |
| unsigned int | index2 | |||
| ) |
Gets the kerning vector between two glyphs
| FT_GlyphSlot FTFace::Glyph | ( | unsigned int | index, | |
| FT_Int | load_flags | |||
| ) |
Loads and creates a Freetype glyph.
| unsigned int FTFace::GlyphCount | ( | ) | const [inline] |
| FT_Error FTFace::Error | ( | ) | const [inline] |
FT_Face* FTFace::ftFace [private] |
FTSize FTFace::charSize [private] |
int FTFace::numGlyphs [private] |
FT_Encoding* FTFace::fontEncodingList [private] |
bool FTFace::hasKerningTable [private] |
This face has kerning tables
Definition at line 138 of file FTFace.h.
Referenced by FTFace(), and KernAdvance().
FT_Error FTFace::err [private] |
FT_Face* FTFace::ftFace [private] |
FT_Encoding* FTFace::fontEncodingList [private] |
1.5.1