Public Member Functions | |
FT_Face | lock_face () |
Gets the FT_Face object from a FreeType backend font and scales it appropriately for the font. | |
void | unlock_face () |
Releases a face obtained with lock_face(). | |
Static Public Member Functions | |
static RefPtr< FtScaledFont > | create (const RefPtr< FtFontFace >& font_face, const Matrix& font_matrix, const Matrix& ctm, const FontOptions& options=FontOptions()) |
Creates a ScaledFont From a FtFontFace. | |
Protected Member Functions | |
FtScaledFont (const RefPtr< FtFontFace >& font_face, const Matrix& font_matrix, const Matrix& ctm, const FontOptions& options=FontOptions()) |
Cairo::FtScaledFont::FtScaledFont | ( | const RefPtr< FtFontFace >& | font_face, |
const Matrix& | font_matrix, | ||
const Matrix& | ctm, | ||
const FontOptions& | options = FontOptions() |
||
) | [protected] |
static RefPtr<FtScaledFont> Cairo::FtScaledFont::create | ( | const RefPtr< FtFontFace >& | font_face, |
const Matrix& | font_matrix, | ||
const Matrix& | ctm, | ||
const FontOptions& | options = FontOptions() |
||
) | [static] |
Creates a ScaledFont From a FtFontFace.
FT_Face Cairo::FtScaledFont::lock_face | ( | ) |
Gets the FT_Face object from a FreeType backend font and scales it appropriately for the font.
You must release the face with unlock_face() when you are done using it. Since the FT_Face object can be shared between multiple ScaledFont objects, you must not lock any other font objects until you unlock this one. A count is kept of the number of times lock_face() is called. unlock_face() must be called the same number of times.
You must be careful when using this function in a library or in a threaded application, because freetype's design makes it unsafe to call freetype functions simultaneously from multiple threads, (even if using distinct FT_Face objects). Because of this, application code that acquires an FT_Face object with this call must add it's own locking to protect any use of that object, (and which also must protect any other calls into cairo as almost any cairo function might result in a call into the freetype library).
void Cairo::FtScaledFont::unlock_face | ( | ) |
Releases a face obtained with lock_face().