-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Description
The 18 @font-face declarations for the InterDisplay font family in both public/hyperswitch/index.html and public/embeddable-app/index.html are missing the font-display: swap descriptor.
Problem
Without font-display: swap, the browser blocks text rendering until the custom font is fully downloaded (FOIT — Flash of Invisible Text). This can add 300–500ms of perceived load time, especially on slower connections.
Solution
Add font-display: swap; to all 18 @font-face declarations in both HTML files. This tells the browser to immediately render text using a fallback font, then swap to the custom font once it's loaded (FOUT — Flash of Unstyled Text), which is a much better UX tradeoff.
Files Affected
public/hyperswitch/index.html(18 @font-face declarations)public/embeddable-app/index.html(18 @font-face declarations)
Impact
- Performance: -300–500ms perceived load time
- Effort: Minimal — adding one CSS property per declaration
- Risk: Low —
font-display: swapis widely supported and the Google Fonts link already uses&display=swap
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels