Skip to content

Inter font files aren't subset: 341 KiB loads on every page #194

Open

Description

@courtneyr-dev

What happened?

Ipsum's Inter files are full builds: assets/fonts/inter/inter-var-normal.woff2 is 349,360 bytes (2,926 glyphs, 2,849 codepoints in 206 ranges: Latin, Latin Extended-A and -B, Vietnamese, Greek, Cyrillic and more) and inter-var-italic.woff2 is 385,120 bytes. None of the theme's 13 @font-face rules sets unicode-range, so a browser that needs any Inter glyph downloads the whole file.

Inter is the body font, so the normal file loads on every page; the italic file loads as soon as a page has italic text.

Same site, same 10 posts and one image, theme switched with WP-CLI, Chromium with cache disabled:

  • Ipsum, no italic text: 462 KiB total at 1280 px (452 KiB at 375 px), of which fonts 394 KiB (Inter normal 341.5 + Manrope 52.6).
  • Ipsum, an in each post: 839 KiB at 1280 px, fonts 770 KiB (adds Inter italic 376.4).
  • Twenty Twenty-Five: 158 KiB at 1280 px (101 KiB at 375 px), fonts 52.6 KiB.

Possible fixes: subset Inter to the scripts the theme supports and split the rest behind unicode-range, or ship static weights for the common case. Related: the home page layout shift when Inter swaps in (separate issue).

AI assistance: Yes
Tool(s): Claude Code
Used for: measuring transfer sizes and parsing the font files (fontTools), and drafting this issue. I reviewed the results and take responsibility for this report.

Where does it happen?

On the site (front end)

Steps to reproduce

  1. Activate Ipsum on WordPress 7.2-beta4 with a few posts.
  2. Load the home page with the browser cache disabled and read the transfer sizes in the Network panel.
  3. Add an to a post and reload: the italic file loads too.

Screenshots or screen recording

No response

WordPress version

7.2-beta4

PHP version

8.3

Ipsum version

1.0

Gutenberg plugin version

Not installed

Browser and device

Chromium 156 (Playwright, headless), macOS, local Docker site

Before you submit

  • I searched the existing issues and this bug hasn't been reported yet.

Activity

  1. elphizu commented on Nov 5, 2026

    @elphizu
    Contributor

    I was able to reproduce this. A few findings that might help decide on the approach:

    Inter is the body font, so the full inter-var-normal.woff2 (349 KB) loads on every page, and inter-var-italic.woff2 (385 KB) loads whenever there's italic text. Most pages only need Latin glyphs.

    I tried splitting Inter into per-script subsets (Latin, Latin Extended, Greek, Cyrillic, and extras), each with a unicodeRange in theme.json. The variable axes are preserved.

    With this approach, a Latin-only page loads 83 KB instead of 349 KB for normal text, and 93 KB instead of 385 KB for italic. Other subsets only load when needed.

    Removing Inter's unused stylistic sets also accounts for about a third of the savings.

    theme.json already supports unicodeRange, and WordPress Core outputs a separate @font-face for each subset (WordPress/gutenberg#48813).

    I used a small Python script with fontTools to generate the subsets. We'd need to regenerate them whenever Inter is updated.

    A couple of questions:

    • Is removing the unused stylistic sets acceptable?
    • Should we keep the regeneration script in the repo, or just document the process?
  2. courtneyr-dev commented on Nov 6, 2026

    @courtneyr-dev
    Author

    Thanks for testing this, @elphizu.

    1. Yes, removing the unused stylistic sets is fine. Ipsum doesn't turn any of them on: there's no font-feature-settings, font-variant or ss01/cv01-style feature reference anywhere in the theme's CSS, theme.json, style variations, patterns or templates. I checked trunk at 6a56343 and the copy bundled with 7.2-beta4.
    2. Please keep the regeneration script in the repo. The subsets have to be regenerated every time Inter is updated, and a script next to the fonts is easier to find and rerun than written steps.

    AI assistance: Yes. Tool: Claude Code. Used for: searching the theme files and drafting this reply. I reviewed the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions