From 0451b8a2d03889964fb8e1bbc4a1b56269658f3b Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Sun, 19 Jan 2025 14:01:50 -0500 Subject: Fix bold and italic font considerations --- ui/styles/fonts.css | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/styles/reset.css | 4 +++- 2 files changed, 67 insertions(+), 1 deletion(-) (limited to 'ui/styles') diff --git a/ui/styles/fonts.css b/ui/styles/fonts.css index d5d1eef..58da205 100644 --- a/ui/styles/fonts.css +++ b/ui/styles/fonts.css @@ -1,31 +1,95 @@ +/*** Alegreya ***/ @font-face { font-family: "Alegreya"; src: url("../fonts/AlegreyaSans-Regular.otf") format("opentype"); font-weight: normal; font-style: normal; + font-display: swap; +} +@font-face { + font-family: "Alegreya"; + src: + url("../fonts/AlegreyaSans-Bold.otf") format("opentype"); + font-weight: bold; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: "Alegreya"; + src: + url("../fonts/AlegreyaSans-Italic.otf") format("opentype"); + font-weight: normal; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: "Alegreya"; + src: + url("../fonts/AlegreyaSans-BoldItalic.otf") format("opentype"); + font-weight: bold; + font-style: italic; + font-display: swap; } +/*** Archistico ***/ @font-face { font-family: "Archistico"; src: url("../fonts/Archistico_Simple.ttf") format("truetype"); font-weight: normal; font-style: normal; + font-display: swap; +} +@font-face { + font-family: "Archistico"; + src: + url("../fonts/Archistico_Bold.ttf") format("truetype"); + font-weight: bold; + font-style: normal; + font-display: swap; } +/*** FiraCode ***/ @font-face { font-family: "FiraCode"; src: url("../fonts/FiraCode-Regular.otf") format("opentype"); font-weight: normal; font-style: normal; + font-display: swap; +} +@font-face { + font-family: "FiraCode"; + src: + url("../fonts/FiraCode-Bold.otf") format("opentype"); + font-weight: bold; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: "FiraCode"; + src: + url("../fonts/FiraCode-Italic.otf") format("opentype"); + font-weight: normal; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: "FiraCode"; + src: + url("../fonts/FiraCode-BoldItalic.otf") format("opentype"); + font-weight: bold; + font-style: italic; + font-display: swap; } +/*** Overlock ***/ @font-face { font-family: "Overlock"; src: url("../fonts/Overlock-Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; + font-display: swap; } diff --git a/ui/styles/reset.css b/ui/styles/reset.css index a3f7681..f9fa505 100644 --- a/ui/styles/reset.css +++ b/ui/styles/reset.css @@ -88,7 +88,9 @@ video { padding: 0; border: 0; font-size: 100%; - font: inherit; + /* The following seems to make `em` not italic, `code` not monospace, etc. + * And that's undesirable. */ + /* font: inherit; */ vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ -- cgit v1.2.3