What is the best way to replace the existing font with a new font? #376
Answered
by
welpo
soumendrak
asked this question in
Q&A
-
I want to use Atkinson hyperlegible for my regular text on my website. I did not find a doc on how to install a custom font. Please help. |
Beta Was this translation helpful? Give feedback.
Answered by
welpo
Sep 3, 2024
Replies: 1 comment 6 replies
-
Good choice! To customise the font, you'll need (1) add the font to your @font-face {
src: local('Atkinson Hyperlegible'),
url('/fonts/Atkinson-Hyperlegible-Regular-102a.woff2') format("woff2");
font-family: 'Atkinson Hyperlegible';
font-display: swap;
}
:root {
--serif-font: 'Atkinson Hyperlegible', serif;
} You can load this file in two ways: with The CSS assumes the font file is at Hope that helps! |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, right!
tabi uses three fonts: one for headers / main page (sans serif), one for article/page content (serif), and one for code.
The defaults are:
You'll need to override each variable separately. If you want to use the same font everywhere (except code) I see two options:
sans-serif-font
to matchserif-font
;serif-font
and setoverride_serif_with_sans = true
in your configuration (docs)Either option should achieve your goal!