跪拜 Guibai
← All articles
Frontend · JavaScript · Programmer

Full Chinese Fonts Cost 1.4s of LCP; a 26.8KB Page Subset Matches System Fonts

By kyriewen ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A 10.89MB font can cost 1.4 seconds of LCP on a 3G connection and typically never loads at all, while a page-specific subset delivers the same text at 26.8KB with no penalty. Any site serving Chinese or other CJK content should treat font subsetting as the default, not an optimization.

Summary

On a simulated Fast 3G connection with 4x CPU throttling, a landing page's 26-character headline takes 628ms with system fonts, but jumps to 2032ms when a full Noto Sans SC OTF is used. Converting to WOFF2 barely helps: 10.89MB still never completes in a 10-second observation window, leaving the page stuck in loading. The extra 1.4 seconds buys only a different glyph skeleton.

Subsetting to the 108 unique characters that actually appear on the page produced a 26.8KB WOFF2 (0.25% of the full file) with the same 640ms LCP as system fonts. Two pitfalls surfaced: adding preload to that tiny font slowed LCP by 88ms, and @fontsource's unicode-range splitting, while sounding on-demand, required 326KB of font plus 105KB of render-blocking CSS and took 4.4 seconds to finish.

The measured data comes with a checklist: keep subsets under 100KB, use font-display: swap, hash file names, and always fall back to a full system font stack. For dynamic, database-driven pages, a GB2312 level-one subset of 3,755 characters at 1,050KB is the pragmatic middle ground, with level-one plus level-two coming to 1,900KB.

Takeaways
— The full Noto Sans SC OTF is 16.4MB; WOFF2 conversion only shrinks it to 10.89MB (32% saving).
— On Fast 3G, the full WOFF2 left LCP at 2044ms and transferred 0 bytes in a 10-second observation window.
— A subset built from the page's 108 unique characters is 26.8KB and matches system-font LCP of 640ms.
— Adding preload to the 26.8KB subset increased LCP to 716ms, 88ms slower than without preload.
— Unicode-range splitting into 102 slices delivered 326KB + 105KB CSS and took 4.4s to finish; FCP was 1788ms.
— font-display: swap hides the real problem: LCP drops to 640ms while the full font still never arrives.
— For database-heavy pages, a GB2312 level-one subset of 3,755 characters costs 1,050KB; level-one plus level-two (6,763 chars) is 1,900KB.
Conclusions

The font-display: swap flag can make LCP look healthy while the font never arrives, so performance budgets must also track document.fonts.ready and actual byte transfer.

Preload is not a universal win; on a critical chain that has only HTML to CSS, preloading a 26.8KB font competes with first render and slows it down.

Unicode-range splitting optimizes for large multi-page sites but its overhead (100+ @font-face rules, 105KB CSS) makes it the slowest option for a single landing page.

The full font's 10.89MB is mathematically impossible to deliver within a 1.6Mbps first-screen budget (54 seconds), so the only real lever is reducing bytes, not changing delivery order.

Concepts & terms
Font subsetting
Generating a font file that contains only the characters needed for a given page, drastically reducing file size by omitting unused glyphs.
Unicode-range splitting
A technique that divides a font into multiple slices, each covering a specific character range, so the browser downloads only the slices that correspond to characters used on the page.
From the discussion
Featured comments
组合搭配函数

This real-world test is really solid; after running seven versions, the full font dragging the title by two seconds makes you shake your head. Subsetting is indeed a must-have for Chinese sites; the time saved is all tangible.

kyriewen

Like.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗