Interface FontFace
ascentOverride: string;
descentOverride: string;
display: FontDisplay;
family: string;
featureSettings: string;
lineGapOverride: string;
loaded: Promise<FontFace>;
status: FontFaceLoadStatus;
stretch: string;
style: string;
unicodeRange: string;
weight: string;
load(): Promise<FontFace>;
}
Index
Properties
ascentOverride
The ascentOverride property of the FontFace interface returns and sets the ascent metric for the font, the height above the baseline that CSS uses to lay out line boxes in an inline formatting context.
descentOverride
The descentOverride property of the FontFace interface returns and sets the value of the @font-face/descent-override descriptor.
display
The display property of the FontFace interface determines how a font face is displayed based on whether and when it is downloaded and ready to use.
family
The FontFace.family property allows the author to get or set the font family of a FontFace object.
featureSettings
The featureSettings property of the FontFace interface retrieves or sets infrequently used font features that are not available from a font's variant properties.
lineGapOverride
The lineGapOverride property of the FontFace interface returns and sets the value of the @font-face/line-gap-override descriptor.
Readonlyloaded
The loaded read-only property of the FontFace interface returns a Promise that resolves with the current FontFace object when the font specified in the object's constructor is done loading or rejects with a SyntaxError.
Readonlystatus
The status read-only property of the FontFace interface returns an enumerated value indicating the status of the font, one of 'unloaded', 'loading', 'loaded', or 'error'.
stretch
The stretch property of the FontFace interface retrieves or sets how the font stretches.
style
The style property of the FontFace interface retrieves or sets the font's style.
unicodeRange
The unicodeRange property of the FontFace interface retrieves or sets the range of unicode code points encompassing the font.
weight
The weight property of the FontFace interface retrieves or sets the weight of the font.
Methods
load
The
load()method of the FontFace interface requests and loads a font whosesourcewas specified as a URL.Returns Promise<FontFace>
The
FontFaceinterface of the CSS Font Loading API represents a single usable font face.MDN Reference