cairomm 1.14.5
|
#include <cairomm/scaledfont.h>
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. | |
![]() | |
static RefPtr< ScaledFont > | create (const RefPtr< FontFace > &font_face, const Matrix &font_matrix, const Matrix &ctm, const FontOptions &options=FontOptions()) |
Creates a ScaledFont object from a font face and matrices that describe the size of the font and the environment in which it will be used. | |
static RefPtr< ScaledFont > | create (const RefPtr< FontFace > &font_face, const cairo_matrix_t &font_matrix, const cairo_matrix_t &ctm, const FontOptions &options=FontOptions()) |
Protected Member Functions | |
FtScaledFont (const RefPtr< FtFontFace > &font_face, const Matrix &font_matrix, const Matrix &ctm, const FontOptions &options=FontOptions()) | |
![]() | |
ScaledFont (const RefPtr< FontFace > &font_face, const cairo_matrix_t &font_matrix, const cairo_matrix_t &ctm, const FontOptions &options=FontOptions()) | |
Additional Inherited Members | |
![]() | |
typedef cairo_scaled_font_t | cobject |
The underlying C cairo object type. | |
![]() | |
cobject * | m_cobject |
The underlying C cairo object that is wrapped by this ScaledFont. | |
|
protected |
|
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().