optimise font (remove CASL axis) & fix caching
This commit is contained in:
parent
0269ed5c60
commit
5304273b28
6 changed files with 8 additions and 6 deletions
|
@ -97,7 +97,7 @@ fn guess_content_type(extension: &str) -> Option<&'static str> {
|
||||||
"html" => Some("text/html"),
|
"html" => Some("text/html"),
|
||||||
"js" => Some("text/javascript"),
|
"js" => Some("text/javascript"),
|
||||||
"css" => Some("text/css"),
|
"css" => Some("text/css"),
|
||||||
"woff" => Some("font/woff2"),
|
"woff2" => Some("font/woff2"),
|
||||||
"svg" => Some("image/svg+xml"),
|
"svg" => Some("image/svg+xml"),
|
||||||
"atom" => Some("application/atom+xml"),
|
"atom" => Some("application/atom+xml"),
|
||||||
"png" => Some("image/png"),
|
"png" => Some("image/png"),
|
||||||
|
|
|
@ -141,7 +141,6 @@ input {
|
||||||
font-weight: 450;
|
font-weight: 450;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
--recursive-mono: 0;
|
--recursive-mono: 0;
|
||||||
--recursive-casl: 0;
|
|
||||||
--recursive-crsv: 0.5;
|
--recursive-crsv: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,9 +149,7 @@ input {
|
||||||
*:after {
|
*:after {
|
||||||
font-variation-settings:
|
font-variation-settings:
|
||||||
"MONO" var(--recursive-mono),
|
"MONO" var(--recursive-mono),
|
||||||
"CASL" var(--recursive-casl),
|
|
||||||
"CRSV" var(--recursive-crsv);
|
"CRSV" var(--recursive-crsv);
|
||||||
|
|
||||||
font-feature-settings: "ss03", "ss04", "ss05", "ss06", "ss08";
|
font-feature-settings: "ss03", "ss04", "ss05", "ss06", "ss08";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,6 @@
|
||||||
& .directions-square {
|
& .directions-square {
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
--recursive-casl: 0;
|
|
||||||
--recursive-mono: 1;
|
--recursive-mono: 1;
|
||||||
color: #d3dce9;
|
color: #d3dce9;
|
||||||
text-shadow:
|
text-shadow:
|
||||||
|
|
6
static/font/README.txt
Normal file
6
static/font/README.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
To produce recursive-casl0.woff2:
|
||||||
|
|
||||||
|
fonttools varLib.instancer Recursive_VF_1.085.woff2 -o recursive-casl0.woff2 CASL=0
|
||||||
|
|
||||||
|
Further optimisations can be done to the font, but removing the CASL axis makes the biggest difference.
|
||||||
|
It is not used anywhere on the website anyways, and saves about half the download size of the font.
|
BIN
static/font/recursive-casl0.woff2
Normal file
BIN
static/font/recursive-casl0.woff2
Normal file
Binary file not shown.
|
@ -7,7 +7,7 @@
|
||||||
<style>
|
<style>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "RecVar";
|
font-family: "RecVar";
|
||||||
src: url("{{{ asset 'font/Recursive_VF_1.085.woff2' }}}");
|
src: url("{{{ asset 'font/recursive-casl0.woff2' }}}");
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" href="{{ asset 'css/base.css' }}">
|
<link rel="stylesheet" href="{{ asset 'css/base.css' }}">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue