Optimized webfonts

- Replaced ancient TTF fallback with less ancient WOFF fallback
- WOFF2 and WOFF fonts are now dehinted and subsetted
- Added CSS `format()` function to font-faces
- Added font-display rule
This commit is contained in:
Victor Westerlund 2021-10-26 16:55:53 +02:00
parent ad20c8118b
commit 4aa37dd129
7 changed files with 12 additions and 10 deletions

View file

@ -9,20 +9,22 @@
@font-face {
font-family: "Roboto Mono";
font-weight: 400;
src: local("Roboto Mono Regular"),
local("RobotoMono-Regular"),
url("../fonts/RobotoMono-Regular.woff2"),
url("../fonts/RobotoMono-Regular.ttf");
font-weight: normal;
font-style: normal;
src: local("Roboto Mono Regular"), local("RobotoMono-Regular"),
url("../fonts/RobotoMono-Regular.woff2") format("woff2"),
url("../fonts/RobotoMono-Regular.woff") format("woff");
font-display: optional;
}
@font-face {
font-family: "Roboto Mono";
font-weight: 700;
src: local("Roboto Mono Bold"),
local("RobotoMono-Bold"),
url("../fonts/RobotoMono-Bold.woff2"),
url("../fonts/RobotoMono-Bold.ttf");
font-weight: bold;
font-style: normal;
src: local("Roboto Mono Bold"), local("RobotoMono-Bold"),
url("../fonts/RobotoMono-Bold.woff2") format("woff2"),
url("../fonts/RobotoMono-Bold.woff") format("woff");
font-display: optional;
}
/* -- Cornerstones -- */

Binary file not shown.

Binary file not shown.