Update the value of the $font-family
variable in assets-src/styles/sass/00-settings/_typesetting.scss
. Use quote marks around fonts with white space in their name.
Be sure to include fonts for both Mac OS and Windows - CSS Font Stack is useful for checking which fonts are readily available on different Operating Systems.
- Save any web font files using the
woff
andwoff2
formats inassets-src/fonts
. - Update the
@font-face
declarations inassets-src/styles/sass/00-settings/_fonts.scss
to point to the files and rename thefont-family
name. - Update the value of the
$font-loaded-family
variable inassets-src/styles/sass/00-settings/_typesetting.scss
.- The designer should have picked system fonts that are similar in appearance to the web font, to minimise the flash of unstyled text (FOUT). If for some reason this has not happened use Font Style Matcher for comparing web fonts with system fonts.
- Update the Font Face Observer script in the
head
of the page template(s) with the relevantfont-family
name(s) - see Font Face Observer on GitHub for details, including how to manage multiple font families.
As covered in How We Load Web Fonts Progressively it's possible to use a cookie to enable the web font as soon as possible.