Skip to content

API Reference / @gtkx/cairo / ToyFontFace

Class: ToyFontFace

Defined in: font-face.d.ts:32

A toy font face, created with FontFace.create or a context's selectFontFace.

Extends

Constructors

Constructor

new ToyFontFace(): ToyFontFace

Returns

ToyFontFace

Inherited from

FontFace.constructor

Properties

__type__

__type__: bigint

Defined in: font-face.d.ts:23

GType of CairoFontFace, the boxed type this class is registered under.

Inherited from

FontFace.__type__

Methods

getFamily()

getFamily(): string

Defined in: font-face.d.ts:34

Returns the family name the font face was created with.

Returns

string


getReferenceCount()

getReferenceCount(): number

Defined in: font-face.d.ts:29

Returns the reference count of the font face.

Returns

number

Inherited from

FontFace.getReferenceCount


getSlant()

getSlant(): FontSlant

Defined in: font-face.d.ts:36

Returns the slant the font face was created with.

Returns

FontSlant


getType()

getType(): FontType

Defined in: font-face.d.ts:27

Returns the backend the font face belongs to.

Returns

FontType

Inherited from

FontFace.getType


getWeight()

getWeight(): FontWeight

Defined in: font-face.d.ts:38

Returns the weight the font face was created with.

Returns

FontWeight


status()

status(): Status

Defined in: font-face.d.ts:25

Returns the error status of the font face, Status.SUCCESS when it is usable.

Returns

Status

Inherited from

FontFace.status


create()

static create(family, slant, weight): ToyFontFace

Defined in: font-face.d.ts:21

Creates a toy font face from a family name, slant and weight.

Parameters

family

string

slant

FontSlant

weight

FontWeight

Returns

ToyFontFace

Inherited from

FontFace.create

Released under the MPL-2.0 License.