@versatiles/style
    Preparing search index...

    Function fetchFontFaces

    • The glyph faces a server publishes, for a font picker — sorted by family, width, weight and italic.

      urls resolves as in osm(): glyphsPattern (default /assets/glyphs/{fontstack}/{range}.pbf) against base (default the page origin, or https://tiles.versatiles.org). The list is read from font_families.json next to the {fontstack} folders, which VersaTiles glyph servers publish.

      Resolves to undefined when there is no list to read — a pattern without a {fontstack} segment, a server that does not publish the file (any non-OK response), or a document that is not a face list — so a UI can fall back to a free text field. Rejects only when the request itself fails.

      npm only. Not exported by the browser bundle (versatiles-style.js) — see the versatiles-style.js module for what that carries.

      Parameters

      • Optionalurls: { base?: string; glyphsPattern?: string }
      • Optionaloptions: {
            fetch?: {
                (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
                (input: string | URL | Request, init?: RequestInit): Promise<Response>;
            };
        }
        • Optionalfetch?: {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          }

      Returns Promise<FontFaceInfo[] | undefined>