From 6411675ee75815c8a784116671666ba0734f625a Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Fri, 11 Sep 2020 13:36:54 -0400 Subject: [PATCH] Improve font loading --- _includes/head.html | 2 +- assets/css/fonts.css | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index e698422..00baed2 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -33,7 +33,7 @@ - + diff --git a/assets/css/fonts.css b/assets/css/fonts.css index b16aa6b..507f65e 100644 --- a/assets/css/fonts.css +++ b/assets/css/fonts.css @@ -1,24 +1,27 @@ @font-face { font-family: "walsheim-bold"; - src: url("../fonts/GT-Walsheim-Bold.woff") + src: url("../fonts/GT-Walsheim-Bold.woff"); + font-display: swap; } @font-face { font-family: "walsheim-regular"; - src: url("../fonts/GT-Walsheim-Regular.woff") + src: url("../fonts/GT-Walsheim-Regular.woff"); + font-display: swap; } @font-face { font-family: "tiempos-regular"; - src: url("../fonts/TiemposTextWeb-Regular.woff2") + src: url("../fonts/TiemposTextWeb-Regular.woff2"); + font-display: swap; } -h1{ +h1 { line-height: 1.25; font-size: 3.5rem; } -h1, h2{ +h1, h2 { font-family: "walsheim-bold", "sans-serif"; } @@ -26,6 +29,6 @@ h3, h4, h5, h6 { font-family: "walsheim-regular", "sans-serif"; } -p{ +p { font-family: "tiempos-regular", "sans-serif"; } \ No newline at end of file