pr_01m47d24b0e6n91zwymwxg0vpx/packages/theme/fonts.css

78 lines2,448 bytesCodeBlame
1/*
2 * g1t's typefaces, served from each site's own origin: Hanken Grotesk for
3 * text and the interface, Bricolage Grotesque for headlines, IBM Plex Mono
4 * for code. All three are under the SIL Open Font License (fonts/OFL-*.txt).
5 *
6 * The files are the Latin subset. Hanken is variable in weight (400 to
7 * 700); Bricolage is variable in weight (500 to 700) and in optical size
8 * (12 to 96), which the browser sets from the font size; Plex Mono comes as
9 * three weights. Each site's bundler fingerprints the files, so they can
10 * be cached for good.
11 *
12 * Text shows at once in a local fallback (font-display: swap). The
13 * fallbacks are Arial scaled to each face's width and line metrics, so the
14 * swap does not move anything on the page.
15 */
16@font-face {
17 font-family: 'Hanken Grotesk';
18 font-style: normal;
19 font-weight: 400 700;
20 font-display: swap;
21 src: url('./fonts/hanken-grotesk-latin.woff2') format('woff2');
22}
23
24@font-face {
25 font-family: 'Bricolage Grotesque';
26 font-style: normal;
27 font-weight: 500 700;
28 font-display: swap;
29 src: url('./fonts/bricolage-grotesque-latin.woff2') format('woff2');
30}
31
32@font-face {
33 font-family: 'IBM Plex Mono';
34 font-style: normal;
35 font-weight: 400;
36 font-display: swap;
37 src: url('./fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
38}
39
40@font-face {
41 font-family: 'IBM Plex Mono';
42 font-style: normal;
43 font-weight: 500;
44 font-display: swap;
45 src: url('./fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
46}
47
48@font-face {
49 font-family: 'IBM Plex Mono';
50 font-style: normal;
51 font-weight: 600;
52 font-display: swap;
53 src: url('./fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
54}
55
56/*
57 * Measured against Arial: size-adjust is the ratio of the two faces'
58 * average letter widths in English text, and the overrides are the web
59 * font's own ascent and descent over that. Mono needs none: Plex Mono and
60 * the usual system monospace faces have the same advance.
61 */
62@font-face {
63 font-family: 'Hanken Grotesk Fallback';
64 src: local('Arial'), local('ArialMT'), local('Helvetica Neue'), local('Helvetica'), local('Roboto');
65 size-adjust: 101.04%;
66 ascent-override: 98.97%;
67 descent-override: 29.99%;
68 line-gap-override: 0%;
69}
70
71@font-face {
72 font-family: 'Bricolage Grotesque Fallback';
73 src: local('Arial'), local('ArialMT'), local('Helvetica Neue'), local('Helvetica'), local('Roboto');
74 size-adjust: 103.6%;
75 ascent-override: 89.77%;
76 descent-override: 26.06%;
77 line-gap-override: 0%;
78}