Skip to content

Load a Korean webfont for /ko - #20286

Closed
posthog[bot] wants to merge 1 commit into
masterfrom
posthog-self-driving/fixko-load-a-korean-webfont-for-the-f542fe
Closed

posthog[bot] wants to merge 1 commit into
masterfrom
posthog-self-driving/fixko-load-a-korean-webfont-for-the-f542fe

Conversation

@posthog

@posthog posthog Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • /ko shipped no Korean webfont, so every Hangul character rendered from whatever font the visitor's device had. A renderer without Korean coverage shows the page as blocks or bars.
  • RoundHog (the body face) and Squeak (the display face) contain no Korean glyphs, so all Hangul on /ko fell straight through to the generic sans-serif fallback. Measured on the running page: all 123 Hangul text nodes resolve through one stack, rounded.
  • Adds the self-hosted IBM Plex Sans KR Korean subset (400 and 700) and puts it ahead of the generic fallback in the four stacks whose named faces have no Hangul.
  • The unicode-range limits each face to Hangul syllables and compatibility jamo, so pages with no Korean text declare the faces and download nothing.
Stack Before After
rounded (body) RoundHog, sans-serif RoundHog, IBM Plex Sans KR, sans-serif
squeak Squeak, sans-serif Squeak, IBM Plex Sans KR, sans-serif
nav IBM Plex Sans Variable, IBM Plex Sans, sans-serif …, IBM Plex Sans KR, sans-serif
button IBM Plex Sans Variable, IBM Plex Sans, sans-serif …, IBM Plex Sans KR, sans-serif

sans, matter, and os are left alone. Their leading entries are system faces, and /ko does not use them.

Cost

Page IBM Plex Sans KR faces Font bytes fetched
/ declared, unloaded none
/ko loaded (400 and 700) 2 woff2 files, ~1 MB, font-display: swap

Both rows are measured in the browser, not estimated. The English homepage fetches no Korean file.

Hangul rendering

The sandbox browser falls back to a Chinese face, which is why the "before" column is readable but wrong: different letter shapes, different metrics, different line breaks. That is the point — the shapes depend on the client, not on us.

Before After
Light ko heading before, light ko heading after, light
Dark ko heading before, dark ko heading after, dark
Full /ko grid — light and dark, narrow (640) and wide (1440)
Before After
Light, 640 ko before, light, narrow ko after, light, narrow
Light, 1440 ko before, light, wide ko after, light, wide
Dark, 640 ko before, dark, narrow ko after, dark, narrow
Dark, 1440 ko before, dark, wide ko after, dark, wide

Note

The report also named React #418 and #423 hydration errors on /ko. Those are site-wide, not Korean — the per-session rate matches /. This PR does not touch them.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json — no page moved
Agent context — what I checked and what I rejected

Verified locally with gatsby develop and headless Chromium on /ko:

  • document.fonts lists IBM Plex Sans KR as loaded on /ko and unloaded on /, and the network log shows the two woff2 files on /ko only.
  • Console errors are the same 6 pre-existing entries before and after. The change adds none.
  • Light and dark, 640 and 1440. pnpm prettier clean on every changed file. No page moved, so pnpm test-redirects does not apply.

Rejected approaches

Approach Why not
Fontsource numbered subsets (400.css) ~14 kB gzip of @font-face rules per weight in the site-wide stylesheet, paid by every visitor
Korean system fonts in the stack (Apple SD Gothic Neo, Malgun Gothic) No download, but still no guarantee — a client without Hangul stays broken
Add the face to every sans-ish stack /ko uses only rounded, so the rest is dead weight
Preload the font in src/html.tsx html.tsx is global, so every visitor would fetch ~1 MB

Note on the lockfile. pnpm add cannot resolve in a clean checkout here: trustPolicy: no-downgrade in pnpm-workspace.yaml rejects a dozen packages already in the lockfile (@headlessui/react, tailwindcss, react-redux and more), and each failure stops the resolve. The three pnpm-lock.yaml entries are therefore written by hand, with the integrity hash read from the registry and confirmed against the downloaded tarball. pnpm install --frozen-lockfile then installs the package and passes.


Created with PostHog Desktop from this inbox report.

Origin

  • Replay Vision
  • First signal: 2026-09-15
  • Inbox report: open
  • Likely cause: d650f81
  • Task started by: auto-start, after the report was rated P3 and ready to fix

The Korean pages shipped no Korean webfont, so Hangul rendered from whatever
font the visitor's device had. RoundHog (the body face) and Squeak (the display
face) contain no Korean glyphs, so every Hangul character on /ko fell through to
the generic sans-serif fallback.

Add the self-hosted IBM Plex Sans KR Korean subset (400 and 700) and put it
ahead of the generic fallback in the four stacks whose named faces have no
Hangul: rounded, squeak, nav, and button.

The unicode-range on each @font-face limits the files to Hangul syllables and
compatibility jamo, so pages with no Korean text declare the faces but download
nothing.

Generated-By: PostHog Desktop
Task-Id: 156e99b8-401c-4d1f-9176-cc2b57e2d997
@posthog

posthog Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

🦔 PostHog Review reviewed this pull request

Nothing worth raising this time, so here's a calming picture instead:

A happy dog on a sunny path

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Sep 18, 2026 03:56AM

@github-actions

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

8.66 MiB (+0.0 KiB / +0.0%)

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 18.58 MiB (+2.2 KiB / +0.0%) report-only 2067
Largest modules in the app closure
Module Size
./src/data/mcp-tools.json 1157.5 KiB
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 773.2 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js 481.4 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs 480.8 KiB
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules 395.1 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs 385.7 KiB
./src/hooks/useCustomers.tsx + 55 modules 372.5 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./src/components/ProductComparisonTable/index.tsx + 126 modules 305.8 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs 281.7 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/director.mjs 275.6 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.7 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in two weeks! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the stale label – otherwise this will be closed in another week. If you want to permanently keep it open, use the waiting label.

@github-actions github-actions Bot added the stale This pull request has been marked as stale and will be closed soon automatically label Oct 2, 2026
@jina-yoon jina-yoon closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This pull request has been marked as stale and will be closed soon automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant