Files
fkysly de0b56a2c4 perf: metric-matched fallback so the Archivo swap moves nothing (#4422)
With the counters fixed, the top remaining field CLS source is the
webfont swap: h1>TEXT (~266/day) plus the card-grid entries it drags
along - the hero re-wraps when Archivo arrives and every card below
shifts. Preload already exists and cannot help visitors whose first
paint beats the font.

This adds a size-adjusted local fallback so text renders in Arial
occupying exactly Archivo's space while the real font is in flight -
the swap then changes glyphs, not geometry. Inserted after the Archivo
faces in all three templates; "Archivo Fallback" joins --display right
after "Archivo".

The ratio is 111.1% against Arial REGULAR, not the naive ratio against
Arial Bold: local('Arial') grabs only the regular face, and the
synthetic bold browsers apply at weight 800 does not widen advances.
The first attempt (103.9%) went the wrong direction; measurement caught
it, review would not have.

Verified in-browser: 15/15 width x text combinations wrap to identical
heights (0.0px max delta) between fallback and loaded Archivo; residual
unwrapped width delta 0.74% against Segoe/plain-Arial's 3-6%. CJK glyphs
fall through to PingFang/Noto exactly as before - the overrides only
touch the Latin runs that were doing the shifting.
2026-09-05 22:28:47 +08:00
..