Using system fonts ensures documentation loads quickly in a font that is familiar to each user, without requiring extra bandwidth to download large font files.
If you’d like to use system fonts, add to assets/scss/common/_variables-custom.scss:
If you’d like to use Google Fonts, the recommended way (for performance reasons) is to self-host the fonts with the help of a tool like for example google-webfonts-helper or Fontsource.
If you’d like to use the “Montserrat” font for example:
Visit google-webfonts-helper, select “Monserrat”, charset “latin”, styles “regular” and “500”.
Copy CSS for modern browsers (use folder prefix /fonts/montserrat/) and paste in assets/scss/common/custom.scss:
Download files, extract, and paste fonts in /static/fonts/montserrat/.
Add to assets/scss/common/_variables-custom.scss:
Avoid Cumulative Layout Shift by preloading the fonts: copy node_modules/@thulite/doks-core/layouts/partials/head/resource-hints.html to layouts/partials/head/resource-hints.html and add — for example: