Skip to content

Commit 7eb2872

Browse files
authored
CCM-9916: preload fonts with cors (#131)
* CCM-9916: preload fonts with cors * CCM-9916: self host fonts
1 parent e72dcd1 commit 7eb2872

11 files changed

+559
-0
lines changed

docs/assets/css/main.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
11
---
22
---
3+
34
@import "../../node_modules/nhsuk-frontend/packages/nhsuk";
45
@import "nhs-colours";
56
@import "breadcrumbs";
67
@import "nhsnotify";
78
@import "nhsnotify-side-nav";
9+
10+
// CCM-9916 - Override @font-face rules from nhsuk-frontend to reference self-hosted fonts
11+
@font-face {
12+
font-display: swap;
13+
font-family: Frutiger W01;
14+
font-style: normal;
15+
font-weight: 400;
16+
src: url(../fonts/FrutigerLTW01-55Roman.eot);
17+
src: url(../fonts/FrutigerLTW01-55Roman.eot) format("eot"),
18+
url(../fonts/FrutigerLTW01-55Roman.woff2) format("woff2"),
19+
url(../fonts/FrutigerLTW01-55Roman.woff) format("woff"),
20+
url(../fonts/FrutigerLTW01-55Roman.ttf) format("truetype"),
21+
url(../fonts/FrutigerLTW01-55Roman.svg) format("svg");
22+
}
23+
24+
@font-face {
25+
font-display: swap;
26+
font-family: Frutiger W01;
27+
font-style: normal;
28+
font-weight: 600;
29+
src: url(../fonts/FrutigerLTW01-65Bold.eot);
30+
src: url(../fonts/FrutigerLTW01-65Bold.eot) format("eot"),
31+
url(../fonts/FrutigerLTW01-65Bold.woff2) format("woff2"),
32+
url(../fonts/FrutigerLTW01-65Bold.woff) format("woff"),
33+
url(../fonts/FrutigerLTW01-65Bold.ttf) format("truetype"),
34+
url(../fonts/FrutigerLTW01-65Bold.svg) format("svg");
35+
}
16.9 KB
Binary file not shown.

docs/assets/fonts/FrutigerLTW01-55Roman.svg

Lines changed: 266 additions & 0 deletions
Loading
35.5 KB
Binary file not shown.
21.6 KB
Binary file not shown.
16.9 KB
Binary file not shown.
16.8 KB
Binary file not shown.

docs/assets/fonts/FrutigerLTW01-65Bold.svg

Lines changed: 265 additions & 0 deletions
Loading
34.8 KB
Binary file not shown.
21.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)