wealth/packages/island/src/styles/fonts.css

42 lines
1.6 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Yekan Bakh, served from each app's public/fonts/ by font-copy-plugin (0011, 0012).
* Every `src` is a root path to a file under its fixed name. Next.js leaves root paths alone; a
* relative url('../fonts/…') would go through the bundler and get a hash.
* A font file is named only here and in CRITICAL_FONT_URL (constants.ts). A changed font ships
* under a new name, never under its old one.
*
* Both faces are variable: wght 100–950 and wdth 62.5–150%. The ranges must be declared:
* without font-stretch the browser leaves wdth at its default, 62.5%, and text renders condensed.
*/
/* Persian digit shapes for Latin digits: every UI text (`font-sans`). Preloaded. */
@font-face {
font-family: 'Yekan Bakh FaNum';
src: url('/fonts/yekan-bakh-fa-num-vf.woff2') format('woff2');
font-weight: 100 950;
font-stretch: 62.5% 150%;
font-display: swap;
}
/* Latin digits: only شبا and other codes banks print that way (`font-latin`). Not preloaded. */
@font-face {
font-family: 'Yekan Bakh';
src: url('/fonts/yekan-bakh-vf.woff2') format('woff2');
font-weight: 100 950;
font-stretch: 62.5% 150%;
font-display: swap;
}
/*
* Shown until Yekan Bakh loads. Its vertical metrics are the web font's own (hhea: ascent 1000,
* descent 550, line gap 0, per 1000 units), so lines keep their height when the font swaps in.
* size-adjust isn't measured yet; it needs Persian text set in Tahoma against Yekan Bakh.
*/
@font-face {
font-family: 'Yekan Bakh Fallback';
src: local('Tahoma'), local('Arial');
ascent-override: 100%;
descent-override: 55%;
line-gap-override: 0%;
}