/*
 * The site's Arabic typeface, served by the platform rather than by a template.
 *
 * Cairo, under the SIL Open Font License — the same family the old project
 * already shipped in templates/commonassets, so the licence question is one the
 * owner has already answered.
 *
 * Platform-level on purpose: a bought template brings its own Latin type, but
 * almost none bring an Arabic one, and the result is what argentinews looked
 * like — a design chosen for its typography rendering in whatever the browser
 * happened to fall back to. A template that does ship an Arabic face simply
 * names it first in its own font-family and this never applies.
 *
 * Variable, and every weight from 200 to 1000 is real. What stood here before
 * was one static weight with a note saying bold would be "left to the browser
 * to synthesise", on the reasoning that real weights meant shipping half a
 * megabyte for headings. That reasoning was wrong, and the note is why this
 * comment says so: the Arabic subset of the variable font is 30 KB, a fifth of
 * the 151 KB single weight it replaced. The site got lighter and its bold got
 * real in the same change.
 *
 * A synthesised bold is worse in Arabic than in Latin, and worse than it sounds.
 * The browser fakes weight by thickening outlines; Arabic letters are told apart
 * by their joins and their thin upstrokes, so thickening everything fattens the
 * joins into the strokes and the word smears. On a news site that is every
 * headline.
 */
@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo-Arabic.woff2') format('woff2');
  /* A range rather than a number: this is where the variable font is declared,
     and it is what makes a heading at 700 a real 700. */
  font-weight: 200 1000;
  font-style: normal;
  /* The text is readable in a fallback face while this loads, rather than
     invisible — a news page whose headlines appear a second late is a news page
     nobody read the headline of. */
  font-display: swap;
  /* Arabic only. A Latin-only page never fetches this at all. Google's own
     range for the subset, which covers what a hand-written one misses: the
     zero-width joiners at U+200C-200E decide how letters connect, and without
     them a word can shape wrongly rather than merely look wrong. */
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4,
    U+10EFC-10EFF;
}
