/*
 * Roboto, self-hosted, served from this plugin.
 *
 * WHY THE FACES ARE HERE AND NOT IN THE CHILD THEME'S theme.json.
 *
 * theme.json is the tidier place to register a font face, and it is where these
 * lived while this was a Twenty Twenty-Five child theme. It cannot work here:
 * theme.json resolves a `file:./` source relative to the THEME directory, and
 * these two files live in the plugin, with the rest of the ordering layer's
 * assets. The alternatives were both worse -- duplicating the woff2 files into
 * every client's child theme, or writing an absolute https:// URL into
 * theme.json, which hardcodes one site's domain into a file that ships to
 * twenty.
 *
 * So `oo-base/theme.json` declares the FAMILY, which is what gives the editor
 * its font picker and the site its `--wp--preset--font-family--roboto`
 * variable, and this file supplies the FACES. Checked on GeneratePress 3.6.1:
 * GP ships no theme.json of its own, so the child's is the site's, and WordPress
 * emits the preset for a family declared with no `fontFace` without trying to
 * print an @font-face rule for it.
 *
 * The latin / latin-ext split and the unicode ranges are Google's own, kept so
 * a page of plain English never downloads the extended file.
 */

@font-face {
	font-family: Roboto;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/roboto-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;
}

@font-face {
	font-family: Roboto;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/roboto-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;
}

/*
 * The site's own type. Twenty Twenty-Five applied this through theme.json's
 * `styles.typography.fontFamily`; GeneratePress sets its own font stack from the
 * customizer, at a specificity `body` cannot beat from a child theme.json alone.
 * Declaring it here keeps the ordering pages on Roboto whatever GP's default is,
 * and `--oo-font` is the one-line override for a client who wants their own.
 */
:root {
	--oo-font: var(--wp--preset--font-family--roboto, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
}

body {
	font-family: var(--oo-font);
}
