Open flaki opened 6 years ago
Well since we have a growing collection of fonts (currently 4 typefaces) and this is a statically generated blog, it would make sense to aggressively subset fonts during build-time (could easily shave off a couple hundred kilobytes from the payload size). A potential issue here could be the un-cacheability of fonts (as they would pretty much change on every build). I any case this still leaves this an interesting question to explore.
Another large contributor to the initial load (besides images) is the webfonts setup. Currently two fonts are used, one for main body and a "display" font for headings and titling.
The body definitely needs some experiments with
font-display
(swap
andoptional
both look interesting)Since this is a statically generated site without much (or rather, any) content changing after the content loaded aggressive subsetting (e.g. something like
subfont
) could be explored to reduce font sizes for at least the display font.