vot.js - v2.4.18
    Preparing search index...

    Interface FontFaceSet

    The FontFaceSet interface of the CSS Font Loading API manages the loading of font-faces and querying of their download status.

    MDN Reference

    interface FontFaceSet {
        onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
        onloadingdone:
            | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any)
            | null;
        onloadingerror:
            | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any)
            | null;
        ready: Promise<FontFaceSet>;
        status: FontFaceSetLoadStatus;
        addEventListener<K extends keyof FontFaceSetEventMap>(
            type: K,
            listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        check(font: string, text?: string): boolean;
        dispatchEvent(event: Event): boolean;
        dispatchEvent(event: Event): boolean;
        forEach(
            callbackfn: (
                value: FontFace,
                key: FontFace,
                parent: FontFaceSet,
            ) => void,
            thisArg?: any,
        ): void;
        load(font: string, text?: string): Promise<FontFace[]>;
        removeEventListener<K extends keyof FontFaceSetEventMap>(
            type: K,
            listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy

    • EventTarget
      • FontFaceSet
    Index
    onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null
    onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null
    onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null
    ready: Promise<FontFaceSet>

    The ready read-only property of the FontFaceSet interface returns a Promise that resolves to the given FontFaceSet.

    MDN Reference

    The status read-only property of the FontFaceSet interface returns the loading state of the fonts in the set.

    MDN Reference

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Type Parameters

      Parameters

      Returns void

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      Returns void

    • The check() method of the FontFaceSet returns true if you can render some text using the given font specification without attempting to use any fonts in this FontFaceSet that are not yet fully loaded.

      MDN Reference

      Parameters

      • font: string
      • Optionaltext: string

      Returns boolean

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      Parameters

      • event: Event

      Returns boolean

    • Parameters

      Returns void

    • The load() method of the FontFaceSet forces all the fonts given in parameters to be loaded.

      MDN Reference

      Parameters

      • font: string
      • Optionaltext: string

      Returns Promise<FontFace[]>