API Reference / @gtkx/cairo / ToyFontFace
Class: ToyFontFace
Defined in: font-face.d.ts:37
A toy font face, created with FontFace.create or a context's selectFontFace.
Extends
Constructors
Constructor
new ToyFontFace():
ToyFontFace
Returns
ToyFontFace
Inherited from
Properties
__type__
__type__:
bigint
Defined in: font-face.d.ts:28
GType of CairoFontFace, the boxed type this class is registered under.
Inherited from
Methods
getFamily()
getFamily():
string
Defined in: font-face.d.ts:39
Returns the family name the font face was created with.
Returns
string
getReferenceCount()
getReferenceCount():
number
Defined in: font-face.d.ts:34
Returns the reference count of the font face.
Returns
number
Inherited from
getSlant()
getSlant():
FontSlant
Defined in: font-face.d.ts:41
Returns the slant the font face was created with.
Returns
getType()
getType():
FontType
Defined in: font-face.d.ts:32
Returns the backend the font face belongs to.
Returns
Inherited from
getWeight()
getWeight():
FontWeight
Defined in: font-face.d.ts:43
Returns the weight the font face was created with.
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
Inherited from
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
ToyFontFace
Inherited from
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
Inherited from
createForPattern()
staticcreateForPattern(pattern):FtFontFace
Defined in: font-face.d.ts:26
Creates a font face for a fontconfig FcPattern handle.