/*
 * Fustat, self-hosted.
 *
 * This replaces the <link> to fonts.googleapis.com in the site layout, which was
 * a render-blocking stylesheet on a third-party origin: the browser had to
 * resolve DNS, complete a TLS handshake and fetch the CSS from googleapis before
 * it even learned the font URLs, then repeat DNS and TLS for gstatic to fetch
 * the font itself. Two extra connections on the critical path, before any text
 * could be painted in the right face.
 *
 * Served from our own origin these are same-connection requests, and the layout
 * preloads the latin file so it starts downloading alongside the stylesheets
 * rather than after them.
 *
 * Google's own CSS serves three subsets — arabic, latin-ext and latin. Only the
 * latin pair is carried here; the site publishes in English for an Indian
 * audience and nothing renders Arabic script. Adding it back is one @font-face
 * and one download from the same versioned URL.
 *
 * `font-display: swap` is kept from the original: text paints immediately in the
 * fallback and re-renders when Fustat arrives, rather than staying invisible.
 * Files are fingerprinted upstream by Google (v4/NaPZcZ...) and served from
 * /webfonts, which next.config gives a one-year immutable Cache-Control.
 *
 * Fustat is licensed under the SIL Open Font License, which permits self-hosting.
 */

/* latin */
@font-face {
  font-family: 'Fustat';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/webfonts/fustat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Fustat';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/webfonts/fustat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
