Skip to content

Commit d76d84e

Browse files
author
Matthieu Lemerre
committed
Self-host the fonts
1 parent addff90 commit d76d84e

5 files changed

+39
-3
lines changed

_includes/head_custom.html

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
{% comment %} Access to the EB Garamond font. The parameters after wght is the normal and bold weights. {% endcomment %}
2-
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond:wght@403;700&display=swap" rel="stylesheet">
1+
2+
{% comment %} Access to the EB Garamond font. The parameters after wght is the normal and bold weights.
3+
Note: we used to use google fonts for this like this:
4+
5+
But for privacy reasons, we now self-host the fonts.
6+
We use the google-webfonts-helper https://gwfh.mranftl.com/fonts/eb-garamond?subsets=latin
7+
for this.
8+
9+
Garamond is used for text, and fondamento for the sidebar.
10+
<!-- <link href="https://fonts.googleapis.com/css2?family=EB+Garamond:wght@403;700&display=swap" rel="stylesheet"> -->
11+
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fondamento:wght@400&display=swap"> -->
12+
{% endcomment %}
13+
<link href="/assets/fonts/fonts.css" rel="stylesheet">
314
{% comment %} <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IM+Fell+DW+Pica:wght@400&display=swap"> {% endcomment %}
4-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fondamento:wght@400&display=swap">
515
{% comment %} <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Modern+Antiqua:wght@400&display=swap"> {% endcomment %}
616
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.0/css/all.css" integrity="sha384-aOkxzJ5uQz7WBObEZcHvV5JvRW3TUc2rNPA7pe3AwnsUohiw1Vj2Rgx2KSOkF5+h" crossorigin="anonymous">
717
<!-- {{ page.css }} -->
21.2 KB
Binary file not shown.
22.8 KB
Binary file not shown.
Binary file not shown.

assets/fonts/fonts.css

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* eb-garamond-regular - latin */
2+
@font-face {
3+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
4+
font-family: 'EB Garamond';
5+
font-style: normal;
6+
font-weight: 400;
7+
src: url('/assets/fonts/eb-garamond-v27-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
8+
}
9+
10+
/* fondamento-regular - latin */
11+
@font-face {
12+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
13+
font-family: 'Fondamento';
14+
font-style: normal;
15+
font-weight: 400;
16+
src: url('../fonts/fondamento-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
17+
}
18+
19+
/* fondamento-italic - latin */
20+
@font-face {
21+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
22+
font-family: 'Fondamento';
23+
font-style: italic;
24+
font-weight: 400;
25+
src: url('../fonts/fondamento-v20-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
26+
}

0 commit comments

Comments
 (0)