Skip to content

The name waits for its font instead of swapping - #342

Merged
rememberYou merged 1 commit into
developfrom
fix/name-font-display
Oct 30, 2026
Merged

rememberYou merged 1 commit into
developfrom
fix/name-font-display

Conversation

@rememberYou

Copy link
Copy Markdown
Owner

On a reload after GitHub Pages' 10-minute cache, the browser revalidates the font, and with font-display: swap the name showed in Times New Roman for a moment, in lower case, since Cinzel Decorative has only capitals.

The name's font now uses font-display: block: its space stays empty for those milliseconds (no layout shift), then it appears in Cinzel. The font is preloaded and small, and the name fades in anyway. Body and title text keep swap, so reading never waits.

Reproduced by delaying the font in Playwright; a new test checks the name's font is block and fails without the fix. 20 tests pass, Lighthouse included.

With font-display: swap, a reload after GitHub Pages' 10-minute cache
showed the name in Times New Roman for a moment, in lower case, as
Cinzel Decorative has only capitals. The name now uses block: its space
stays empty for those milliseconds, then it appears in Cinzel. Body
text still swaps.
@rememberYou
rememberYou merged commit a7ae228 into develop Oct 30, 2026
1 check passed
@rememberYou
rememberYou deleted the fix/name-font-display branch October 30, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant