commit 464eb0e4c801a29d1cf9107d7a78fc9a17569b2a
parent 0b050d5678e138e78b591c13e21a4178dc3dab94
Author: corndog <cauchyn@firemail.cc>
Date: Wed, 15 May 2019 20:50:26 -0700
Set font-display to swap to limit render blocking
on supported browsers.
Kind of wild that Chromium-based browers don't do
this by default. It makes me question both how
explicit we should be and how respectful we should
be of the user agent's settings.
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/in/static/charter.css b/in/static/charter.css
@@ -1,6 +1,7 @@
@font-face {
font-family: "Charter";
src: local("Charter"), url("./charter/charter_regular.woff") format("woff");
+ font-display: swap;
font-style: normal;
font-weight: 400;
}
@@ -9,6 +10,7 @@
font-family: "Charter";
src: local("Charter Italic"),
url("./charter/charter_italic.woff") format("woff");
+ font-display: swap;
font-style: italic;
font-weight: 400;
}
@@ -16,6 +18,7 @@
@font-face {
font-family: "Charter";
src: local("Charter Bold"), url("./charter/charter_bold.woff") format("woff");
+ font-display: swap;
font-style: normal;
font-weight: 700;
}
@@ -24,6 +27,7 @@
font-family: "Charter";
src: local("Charter Bold Italic"),
url("./charter/charter_bold_italic.woff") format("woff");
+ font-display: swap;
font-style: italic;
font-weight: 700;
}
diff --git a/in/static/cooperhewitt.css b/in/static/cooperhewitt.css
@@ -2,6 +2,7 @@
font-family: "Cooper Hewitt";
src: local("Cooper Hewitt"),
url("./cooperhewitt/CooperHewitt-Book.woff") format("woff");
+ font-display: swap;
font-style: normal;
font-weight: 400;
}
@@ -10,6 +11,7 @@
font-family: "Cooper Hewitt";
src: local("Cooper Hewitt"),
url("./cooperhewitt/CooperHewitt-BookItalic.woff") format("woff");
+ font-display: swap;
font-style: italic;
font-weight: 400;
}
@@ -18,6 +20,7 @@
font-family: "Cooper Hewitt";
src: local("Cooper Hewitt"),
url("./cooperhewitt/CooperHewitt-Bold.woff") format("woff");
+ font-display: swap;
font-style: normal;
font-weight: 700;
}
@@ -26,6 +29,7 @@
font-family: "Cooper Hewitt";
src: local("Cooper Hewitt"),
url("./cooperhewitt/CooperHewitt-BoldItalic.woff") format("woff");
+ font-display: swap;
font-style: italic;
font-weight: 700;
}