[]previous and next page

FontFaceOptions

Options of fontFace.

Options of fontFace.

Import#

ts
import type { FontFaceOptions } from "@shadow-js/dusk";

Signature#

ts
interface FontFaceOptions {
  /** The family name the CSS uses. */
  readonly family: string;
  /** The sources, in the order the browser tries them. */
  readonly src: readonly FontSource[];
  /** A weight, or a range (`"100 900"`). */
  readonly weight?: string | number;
  /** `normal`, `italic` or `oblique`. */
  readonly style?: "normal" | "italic" | "oblique";
  /** Default `swap`: show the fallback at once, then the web font. */
  readonly display?: FontDisplay;
  /** The characters the face covers (`U+0000-00FF`). */
  readonly unicodeRange?: string;
  /** A stretch (width axis) or a range of them: `"75% 100%"` for a variable `wdth` axis. */
  readonly stretch?: string;
}

Members#

Name Type Description
family readonly family: string The family name the CSS uses.
src readonly src: readonly FontSource[] The sources, in the order the browser tries them.
weight? readonly weight?: string | number A weight, or a range ("100 900").
style? readonly style?: "normal" | "italic" | "oblique" normal, italic or oblique.
display? readonly display?: FontDisplay Default swap: show the fallback at once, then the web font.
unicodeRange? readonly unicodeRange?: string The characters the face covers (U+0000-00FF).
stretch? readonly stretch?: string A stretch (width axis) or a range of them: "75% 100%" for a variable wdth axis.