planningalerts
planningalerts copied to clipboard
Only load the font weights that we're actually using so that this is faster
https://github.com/openaustralia/planningalerts/blob/71214c159aaa21ad634aa66ed1cf892bfcf4b944/app/views/_tailwind/application/_html_head.html.erb#L11
I've gone through all the templates, components and form builders to see what fonts and weights we're currently using.
The full list is:
font-sans (Fira Sans)
- font-light (300)
- font-normal (400)
- font-medium (500)
- font-semibold (600)
- font-bold (700)
font-display (Merriweather)
- bold (700)
- font-black (900)
font-mono
- normal (400)
The following ones are used in lots of places:
font-sans (Fira Sans)
- font-normal (400)
- font-semibold (600)
- font-bold (700)
font-display (Merriweather)
- bold (700)
The rest are used in only a few places:
font-sans (Fira Sans)
- font-light (300) - "... characters minimum", "forgot your password?"
- font-medium (500) - header, main navigation
font-display (Merriweather)
- font-black (900) - coverage percentage
font-mono
- normal (400) - under the hood page for scraper run log
@JoannaHill for the font weights that are used in only a few places would it be possible to replace them with one of the other font weights so we could reduce the amount of fonts stuff we have to load and so improve the speed of the site?