Skip to content

Commit cd12935

Browse files
committed
provide easy @import CDN directives for fonts
1 parent 7761e77 commit cd12935

File tree

2 files changed

+84
-5
lines changed

2 files changed

+84
-5
lines changed

css/ar5iv-fonts.css

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:[email protected]');
2+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400..700;1,400..700');
3+
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400..700;1,400..700');
4+
@import url('https://fonts.googleapis.com/css2?family=STIX+Two+Math');
5+
6+
/*======================================================================
7+
Fallback fonts -- check locally if CDN access is blocked. */
8+
@font-face{
9+
font-display: fallback;
10+
font-family: "Noto Sans Mono Fallback";
11+
font-style: normal;
12+
font-weight: 700;
13+
src: local("Noto Sans Mono Bold"),
14+
local("NotoSansMono-Bold"); }
15+
@font-face{
16+
font-display: fallback;
17+
font-family: "Noto Sans Mono Fallback";
18+
font-style: normal;
19+
src: local("Noto Sans Mono"),
20+
local("NotoSansMono-Regular"); }
21+
@font-face{
22+
font-display: fallback;
23+
font-family: "Noto Sans Fallback";
24+
font-weight: 700;
25+
font-style: italic;
26+
src: local("Noto Sans Bold Italic"),
27+
local("NotoSans-BoldItalic"); }
28+
@font-face{
29+
font-display: fallback;
30+
font-family: "Noto Sans Fallback";
31+
font-style: normal;
32+
font-weight: 700;
33+
src: local("Noto Sans Bold"),
34+
local("NotoSans-Bold"); }
35+
@font-face{
36+
font-display: fallback;
37+
font-family: "Noto Sans Fallback";
38+
font-style: italic;
39+
src: local("Noto Sans Italic"),
40+
local("NotoSans-Italic"); }
41+
@font-face{
42+
font-display: fallback;
43+
font-family: "Noto Sans Fallback";
44+
font-style: normal;
45+
src: local("Noto Sans"),
46+
local("NotoSans-Regular"); }
47+
48+
@font-face{
49+
font-display: fallback;
50+
font-family: "Noto Serif Fallback";
51+
font-weight: 700;
52+
font-style: italic;
53+
src: local("Noto Serif Bold Italic"),
54+
local("NotoSerif-BoldItalic"); }
55+
@font-face{
56+
font-display: fallback;
57+
font-family: "Noto Serif Fallback";
58+
font-style: normal;
59+
font-weight: 700;
60+
src: local("Noto Serif Bold"),
61+
local("NotoSerif-Bold"); }
62+
@font-face{
63+
font-display: fallback;
64+
font-family: "Noto Serif Fallback";
65+
font-style: italic;
66+
src: local("Noto Serif Italic"),
67+
local("NotoSerif-Italic"); }
68+
@font-face{
69+
font-display: fallback;
70+
font-family: "Noto Serif Fallback";
71+
font-style: normal;
72+
src: local("Noto Serif"),
73+
local("NotoSerif-Regular"); }
74+
@font-face {
75+
font-display: fallback;
76+
font-family: "STIX Two Math Fallback";
77+
font-style: normal;
78+
src: local("STIX Two Math"),
79+
local("STIXTwoMath-Regular"); }

css/ar5iv.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
--main-width: 52rem;
55
--main-width-margin: 54rem;
66
/* fonts */
7-
--headings-font-family: "Noto Sans", sans-serif;
8-
--text-font-family: "Noto Serif", serif;
9-
--math-font-family: "STIX Two Math", "Cambria Math", math;
7+
--headings-font-family: "Noto Sans", "Noto Sans Fallback", sans-serif;
8+
--text-font-family: "Noto Serif", "Noto Serif Fallback", serif;
9+
--math-font-family: "STIX Two Math", "STIX Two Math Fallback", "Cambria Math", math;
1010
/* Should we do anything special for caligraphic?
1111
e.g. "Lucida Calligraphy","Zapf Chancery","URW Chancery L", TeX Gyre Termes...*/
12-
--math-caligraphic-font-family: "STIX Two Math", "Cambria Math", math;
13-
--code-font-family: "Noto Sans Mono", monospace;
12+
--math-caligraphic-font-family: "STIX Two Math", "STIX Two Math Fallback", "Cambria Math", math;
13+
--code-font-family: "Noto Sans Mono", "Noto Sans Mono Fallback", monospace;
1414
/* default color theme is light */
1515
--background-color: white;
1616
--text-color: #292929;

0 commit comments

Comments
 (0)