@nextcloud/dialogs
    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: null | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any);
        onloadingdone:
            | null
            | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any);
        onloadingerror:
            | null
            | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any);
        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;
        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

    Properties

    onloading: null | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any)
    onloadingdone: null | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any)
    onloadingerror: null | ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any)
    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

    Methods

    • 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

    • 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[]>