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

PropertyModifierTypeDescription
ascentOverridepublicstringMDN Reference
descentOverridepublicstringMDN Reference
displaypublicFontDisplayMDN Reference
familypublicstringMDN Reference
featureSettingspublicstringMDN Reference
lineGapOverridepublicstringMDN Reference
loadedreadonlyPromise<FontFace>MDN Reference
statusreadonlyFontFaceLoadStatusMDN Reference
stretchpublicstringMDN Reference
stylepublicstringMDN Reference
unicodeRangepublicstringMDN Reference
weightpublicstringMDN Reference

Methods

load()

load(): Promise<FontFace>

MDN Reference

Returns

Promise<FontFace>

Implementation of

globalThis.FontFace.load

On this page