/*
 * Self-hosted DM Sans (latin subset, woff2).
 * Degular is loaded from the Adobe Fonts kit (see inc/enqueue.php).
 */

@font-face {
	font-family: 'DM Sans';
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
	font-family: 'DM Sans';
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
	font-family: 'DM Sans';
	font-weight: 600;
	font-style: normal;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-600-normal.woff2') format('woff2');
}

/*
 * Metric-matched fallback so the swap to DM Sans does not shift the layout.
 * Values computed from DM Sans vs Arial (weighted letter widths).
 */
@font-face {
	font-family: 'DM Sans Fallback';
	src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
	size-adjust: 104.61%;
	ascent-override: 94.83%;
	descent-override: 29.63%;
	line-gap-override: 0%;
}

/*
 * Fallback for the Degular headings while the Adobe Fonts kit loads: Arial scaled
 * to Degular's width (measured on a Dutch sample sentence, 600 weight: 86.4%), so
 * the swap hardly moves the lines.
 */
@font-face {
	font-family: 'Degular Fallback';
	src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
	font-weight: 500 700;
	size-adjust: 86.4%;
}
