Skip to content

API Reference / @gtkx/cairo / FtFontFace

Class: FtFontFace ​

Defined in: packages/cairo/src/font-face.ts:118

A FreeType font face returned by Cairo or another native library.

Extends ​

Constructors ​

Constructor ​

new FtFontFace(): FtFontFace

Returns ​

FtFontFace

Inherited from ​

FontFace.constructor

Properties ​

__type__ ​

__type__: bigint

Defined in: packages/cairo/src/font-face.ts:81

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

Inherited from ​

FontFace.__type__

Methods ​

getReferenceCount() ​

getReferenceCount(): number

Defined in: packages/cairo/src/font-face.ts:94

Returns the reference count of the font face.

Returns ​

number

Inherited from ​

FontFace.getReferenceCount


getSynthesize() ​

getSynthesize(): number

Defined in: packages/cairo/src/font-face.ts:120

Returns the styles currently synthesized for the font face.

Returns ​

number


getType() ​

getType(): FontType

Defined in: packages/cairo/src/font-face.ts:89

Returns the backend the font face belongs to.

Returns ​

FontType

Inherited from ​

FontFace.getType


setSynthesize() ​

setSynthesize(synthFlags): void

Defined in: packages/cairo/src/font-face.ts:125

Enables synthesizing of the given styles.

Parameters ​

synthFlags ​

number

Returns ​

void


status() ​

status(): Status

Defined in: packages/cairo/src/font-face.ts:84

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

Returns ​

Status

Inherited from ​

FontFace.status


unsetSynthesize() ​

unsetSynthesize(synthFlags): void

Defined in: packages/cairo/src/font-face.ts:130

Disables synthesizing of the given styles.

Parameters ​

synthFlags ​

number

Returns ​

void


create() ​

static create(family, slant, weight): ToyFontFace

Defined in: packages/cairo/src/font-face.ts:76

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