Skip to content

API Reference / @gtkx/cairo / FtFontFace

Class: FtFontFace

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

A FreeType font face, created with FontFace.createForFtFace or FontFace.createForPattern.

Extends

Constructors

Constructor

new FtFontFace(): FtFontFace

Returns

FtFontFace

Inherited from

FontFace.constructor

Properties

__type__

__type__: bigint

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

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

Inherited from

FontFace.__type__

Methods

getReferenceCount()

getReferenceCount(): number

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

Returns the reference count of the font face.

Returns

number

Inherited from

FontFace.getReferenceCount


getSynthesize()

getSynthesize(): FtSynthesize

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

Returns the styles currently synthesized for the font face.

Returns

FtSynthesize


getType()

getType(): FontType

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

Returns the backend the font face belongs to.

Returns

FontType

Inherited from

FontFace.getType


setSynthesize()

setSynthesize(synthFlags): void

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

Enables synthesizing of the given styles.

Parameters

synthFlags

FtSynthesize

Returns

void


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

Status

Inherited from

FontFace.status


unsetSynthesize()

unsetSynthesize(synthFlags): void

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

Disables synthesizing of the given styles.

Parameters

synthFlags

FtSynthesize

Returns

void


create()

static create(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

FontSlant

weight

FontWeight

Returns

ToyFontFace

Inherited from

FontFace.create


createForFtFace()

static createForFtFace(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

ExternalObject<Handle>

loadFlags

number

Returns

FtFontFace

Inherited from

FontFace.createForFtFace


createForPattern()

static createForPattern(pattern): FtFontFace

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

Creates a font face for a fontconfig FcPattern handle.

Parameters

pattern

ExternalObject<Handle>

Returns

FtFontFace

Inherited from

FontFace.createForPattern

Released under the MPL-2.0 License.