/* Self-hosted @font-face rules for the Image Studio's editor fonts (IS-705).
 *
 * These eight families used to be loaded from a third-party Google Fonts
 * CDN. That request is what LG Munich I, 3 O 17493/20 (Jan 2022) held
 * breaches the GDPR when done without user consent, and it also meant the
 * editor's fonts did not work offline. Both problems go away once the bytes
 * are served same-origin, so the woff2 files below were pulled once from
 * Google's own CDN (latin subset only, ~296 KB total) and vendored into
 * this directory.
 *
 * This file is generated to match src/fonts/fontCatalog.ts -- specifically
 * `FONT_CATALOG`'s families/weights and `LOCAL_FONTS_STYLESHEET_HREF`'s
 * filename mapping. If you add, remove, or re-weight a family there, mirror
 * the change here (and vendor/remove the matching woff2 under this
 * directory) or `fontLoader.test.manual.ts` will not have anything to check
 * it against.
 *
 * `font-weight` is a RANGE (e.g. `400 800`) rather than a single value on
 * every family but Anton: each of these woff2 files is a variable font whose
 * `wght` axis spans that range, so one file serves every weight in between --
 * exactly how the Google Fonts `wght@min..max` request these replaced also
 * worked. `font-display: swap` matches the old CDN stylesheet's behaviour:
 * text paints immediately in the fallback face and swaps when the local file
 * (now same-origin, effectively instant after the first load) is parsed.
 *
 * Licensing: all eight families are SIL Open Font License. The full license
 * text and each family's copyright notice are in ./OFL.txt, alongside the
 * font files, as the OFL requires.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/outfit.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/montserrat.woff2') format('woff2');
}

/* Anton ships one weight only -- see the note on its FontCatalogEntry in
 * fontCatalog.ts. Declaring a range here would be a lie: there is no axis to
 * span, just the single static instance below. */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/anton.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/playfair-display.woff2') format('woff2');
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/cinzel.woff2') format('woff2');
}

/* Caveat's variable axis stops at 700 -- see its FontCatalogEntry note.
 * ExtraBold (800) is browser-synthesised, in both the DOM preview and the
 * canvas export, so the two still agree with each other. */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/caveat.woff2') format('woff2');
}
