/* The desktop app's UI faces (src/design/fonts.css), bundled locally because the CSP is font-src 'self'. All SIL OFL 1.1;
   licences beside the files: Plus Jakarta Sans for Latin, Noto Sans SC UI for Chinese, Geist Mono for code and numbers
   in tables. The files are byte-identical to the desktop's (tests/dashboard-static.test.cjs). */

/* Plus Jakarta Sans, variable 200 to 800 (PlusJakartaSans-OFL.txt), split like the upstream web subsets.
   index.html preloads the latin file so the first frame already has it. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable-latin.woff2") format("woff2-variations"),
       url("../fonts/PlusJakartaSans-Variable-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable-latin-ext.woff2") format("woff2-variations"),
       url("../fonts/PlusJakartaSans-Variable-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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;
}

/* Vietnamese: the letters with stacked marks (ạ ấ ở …), so a Vietnamese word is never half another face.
   @fontsource-variable/plus-jakarta-sans 5.3.0, the same release as the two files above. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable-vietnamese.woff2") format("woff2-variations"),
       url("../fonts/PlusJakartaSans-Variable-vietnamese.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Geist Mono, variable 100 to 900 (OFL.txt). */
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations"),
       url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Chinese UI text: Noto Sans SC UI, variable 100 to 900 (NotoSansSC-OFL.txt), the desktop's subset. Fetched only when
   a page shows Chinese. Other characters fall back to the system CJK faces in --font-sans. */
@font-face {
  font-family: "Noto Sans SC UI";
  src: url("../fonts/NotoSansSC-UI.woff2") format("woff2-variations"),
       url("../fonts/NotoSansSC-UI.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2E80-2FDF, U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* The CJK shapes of curly double quotes and the ellipsis for Chinese text (tokens.css puts this family first under
   :lang(zh)); single quotes stay out, since ’ is nearly always an English apostrophe. */
@font-face {
  font-family: "Noto Sans SC UI Punctuation";
  src: url("../fonts/NotoSansSC-UI.woff2") format("woff2-variations"),
       url("../fonts/NotoSansSC-UI.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+201C-201D, U+2026;
}
