Skip to content

Commit 8627edb

Browse files
perf: shrink Material Symbols icon font and favicon
The icon font URL requested the full variable font across every axis range (opsz/wght/FILL/GRAD), making Google serve a ~3.8MB woff2 - the single largest resource on every page and the long pole on the load event. Only wght 200-400 and FILL 0/1 are actually used, so pin opsz=24/GRAD=0 and narrow the ranges: Google now serves a ~1.1MB instance (-72%). Also downscale favicon.png from 809x809/104KB to 64x64/2.7KB. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3fab174 commit 8627edb

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎public/favicon.png‎

-101 KB
Loading

‎src/pages/_app.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,19 @@ function MaiaPlatform({ Component, pageProps }: AppProps) {
8282
>
8383
<Head>
8484
<link rel="icon" type="image/png" href="/favicon.png" />
85+
<link
86+
rel="preconnect"
87+
href="https://fonts.gstatic.com"
88+
crossOrigin="anonymous"
89+
/>
90+
{/*
91+
Pin the optical-size and grade axes (only wght 200-400 and FILL
92+
0/1 are actually used) so Google serves a ~1.1MB instance instead
93+
of the full ~3.8MB variable font.
94+
*/}
8595
<link
8696
rel="stylesheet"
87-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"
97+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,200..400,0..1,0&display=block"
8898
/>
8999

90100
<meta name="apple-mobile-web-app-capable" content="yes" />

0 commit comments

Comments
 (0)