PSA: A guy at a meetup in Baltimore said his icon font was quietly breaking his page, and I checked mine too | Crafting With Code - The Design Community Hub
PSA: A guy at a meetup in Baltimore said his icon font was quietly breaking his page, and I checked mine too
I was at a small design meetup in Baltimore last Tuesday and a guy there mentioned his hand-built icon font was adding 180ms to his first paint because the browser was blocking on the font file. He said he only found out after running Lighthouse on a slow 3G throttle and watching the icons flash in late on every page. I went home and checked my own icon set, which I built back in March, and sure enough the woff2 was 240KB because I never stripped the unused glyphs. Cutting it down to 34KB with a subset script took about 20 minutes and my load time dropped by almost a third. It was a good reminder that the stuff we hand-code tends to be the stuff we forget to audit. Has anyone else run into a font or icon file quietly becoming the heaviest thing on the page, and what did you use to trim it?