API Reference / @gtkx/cairo / FontFace
Abstract Class: FontFace
Defined in: font-face.d.ts:20
A cairo font face (cairo_font_face_t): a typeface independent of size and transformation. Font faces come from the create* statics or from a context, and wrap as the concrete class their type reports (instanceof ToyFontFace after selectFontFace).
Extended by
Constructors
Constructor
new FontFace():
FontFace
Returns
FontFace
Properties
__type__
__type__:
bigint
Defined in: font-face.d.ts:28
GType of CairoFontFace, the boxed type this class is registered under.
Methods
getReferenceCount()
getReferenceCount():
number
Defined in: font-face.d.ts:34
Returns the reference count of the font face.
Returns
number
getType()
getType():
FontType
Defined in: font-face.d.ts:32
Returns the backend the font face belongs to.
Returns
status()
status():
Status
Defined in: font-face.d.ts:30
Returns the error status of the font face, Status.SUCCESS when it is usable.
Returns
create()
staticcreate(family,slant,weight):ToyFontFace
Defined in: font-face.d.ts:22
Creates a toy font face from a family name, slant and weight.
Parameters
family
string
slant
weight
Returns
createForFtFace()
staticcreateForFtFace(face,loadFlags):FtFontFace
Defined in: font-face.d.ts:24
Creates a font face for a FreeType FT_Face handle, with the given FT_LOAD_* flags.
Parameters
face
loadFlags
number
Returns
createForPattern()
staticcreateForPattern(pattern):FtFontFace
Defined in: font-face.d.ts:26
Creates a font face for a fontconfig FcPattern handle.