FTFontFace

Font support for FreeType

static if(CAIRO_HAS_FT_FONT)
class FTFontFace : FontFace {}

Constructors

this
this(cairo_font_face_t* ptr)

Create a FTFontFace from a existing cairo_font_face_t*. FTFontFace is a garbage collected class. It will call cairo_font_face_destroy when it gets collected by the GC or when dispose() is called.

this
this(FT_Face face, int loadFlags)

Creates a new font face for the FreeType font backend from a pre-opened FreeType face. This font can then be used with Context.setFontFace() or new ScaledFont(). The ScaledFont returned from new ScaledFont() is also for the FreeType backend and can be used with functions such as $(FTScaledFont.lockFace()). Note that Cairo may keep a reference to the FT_Face alive in a font-cache and the exact lifetime of the reference depends highly upon the exact usage pattern and is subject to external factors. You must not call FT_Done_Face() before the FTFontFace has been disposed / collected.

Inherited Members

From FontFace

__anonymous
mixin CairoCountedClass!(cairo_font_face_t*, "cairo_font_face_")
checkError
void checkError()

Method for use in subclasses. Calls cairo_font_face_status(nativePointer) and throws an exception if the status isn't CAIRO_STATUS_SUCCESS

createFromNative
FontFace createFromNative(cairo_font_face_t* ptr, bool adjRefCount)

The createFromNative method for the FontFace classes. See https://github.com/jpf91/cairoD/wiki/Memory-Management#createFromNative for more information.

getType
FontType getType()

This function returns the C type of a FontFace. See FontType for available types.

type
alias type = getType

convenience alias

Meta