nx.js
Classes

FontFace

Defines the source of a font face, either a URL to an external resource or a buffer, and font properties such as style, weight, and so on. For URL font sources it allows authors to trigger when the remote font is fetched and loaded, and to track loading status.

See

https://developer.mozilla.org/docs/Web/API/FontFace

Implements

Constructors

new FontFace()

new FontFace(family, source, descriptors): FontFace

Parameters

ParameterType
familystring
sourcestring | BufferSource
descriptorsFontFaceDescriptors

Returns

FontFace

Properties

PropertyModifierType
ascentOverridepublicstring
descentOverridepublicstring
displaypublicFontDisplay
familypublicstring
featureSettingspublicstring
lineGapOverridepublicstring
loadedreadonlyPromise<FontFace>
statusreadonlyFontFaceLoadStatus
stretchpublicstring
stylepublicstring
unicodeRangepublicstring
weightpublicstring

Methods

load()

load(): Promise<FontFace>

Returns

Promise<FontFace>

Implementation of

globalThis.FontFace.load

On this page