Skip to content

Commit 7da880c

Browse files
committed
CCM-9916: self host fonts
1 parent 23b1bf8 commit 7da880c

12 files changed

+559
-4
lines changed

docs/_layouts/default.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
<title>
1010
NHS Notify - {{ page.title | default: site.title }}
1111
</title>
12-
<link rel='preload' as='font' href='https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2' type='font/woff2'
13-
crossorigin="anonymous" />
14-
<link rel='preload' as='font' href='https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2' type='font/woff2'
15-
crossorigin="anonymous" />
1612
<link href="{{site.baseurl}}/assets/css/main.css" rel="stylesheet">
1713
<script src="{{site.baseurl}}/assets/js/nhsuk.min.js" defer=""></script>
1814

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.

0 commit comments

Comments
 (0)