Skip to content

Commit db52096

Browse files
committed
Add preloading of fonts
1 parent 86ae560 commit db52096

File tree

7 files changed

+40
-5
lines changed

7 files changed

+40
-5
lines changed

index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,41 @@
1515
content="yes"
1616
/>
1717
<meta name="theme-color" />
18+
<link
19+
rel="preload"
20+
as="font"
21+
href="/fonts/SourceSans3VF-Upright.woff2"
22+
type="font/woff2"
23+
crossorigin="anonymous"
24+
/>
25+
<link
26+
rel="preload"
27+
as="font"
28+
href="/fonts/SourceSans3VF-Italic.woff2"
29+
type="font/woff2"
30+
crossorigin="anonymous"
31+
/>
32+
<link
33+
rel="preload"
34+
as="font"
35+
href="/fonts/SourceCodeVF-Upright.woff2"
36+
type="font/woff2"
37+
crossorigin="anonymous"
38+
/>
39+
<link
40+
rel="preload"
41+
as="font"
42+
href="/fonts/NiceVAR.woff2"
43+
type="font/woff2"
44+
crossorigin="anonymous"
45+
/>
46+
<link
47+
rel="preload"
48+
as="font"
49+
href="/fonts/NiceVAR-Italic.woff2"
50+
type="font/woff2"
51+
crossorigin="anonymous"
52+
/>
1853
<link
1954
rel="manifest"
2055
href="/app.webmanifest"
File renamed without changes.
File renamed without changes.

src/assets/fonts.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
@font-face {
22
font-family: 'Source Sans 3 Var';
3-
src: url(fonts/SourceSans3VF-Upright.otf.woff2);
3+
src: url(/fonts/SourceSans3VF-Upright.woff2);
44
font-display: block;
55
font-weight: 100 900;
66
font-style: normal;
77
}
88

99
@font-face {
1010
font-family: 'Source Sans 3 Var';
11-
src: url(fonts/SourceSans3VF-Italic.otf.woff2);
11+
src: url(/fonts/SourceSans3VF-Italic.woff2);
1212
font-display: block;
1313
font-weight: 100 900;
1414
font-style: italic;
1515
}
1616

1717
@font-face {
1818
font-family: 'Source Code Var';
19-
src: url(fonts/SourceCodeVF-Upright.otf.woff2);
19+
src: url(/fonts/SourceCodeVF-Upright.woff2);
2020
font-display: block;
2121
font-weight: 100 900;
2222
font-style: normal;
2323
}
2424

2525
@font-face {
2626
font-family: 'Nice Var';
27-
src: url(fonts/NiceVAR.woff2);
27+
src: url(/fonts/NiceVAR.woff2);
2828
font-display: block;
2929
font-weight: 100 900;
3030
font-style: normal;
3131
}
3232

3333
@font-face {
3434
font-family: 'Nice Var';
35-
src: url(fonts/NiceVAR-Italic.woff2);
35+
src: url(/fonts/NiceVAR-Italic.woff2);
3636
font-display: block;
3737
font-weight: 100 900;
3838
font-style: italic;

0 commit comments

Comments
 (0)