Repository navigation
Conversation
Geist and Lora are Latin-only, and the Korean system faces in the :lang(ko) stack are often missing, so Hangul fell through to a Chinese face. Ship a Hangul-only Pretendard subset after the Latin webfonts. Co-authored-by: Sungheon Jeong <elon4856@gmail.com>
Answer prose already fell back to Hangul Sans, but fenced code sets an inline monospace stack and inline code uses font-mono. Neither included the Hangul subset, so Korean comments rendered with a Chinese fallback. Co-authored-by: Sungheon Jeong <elon4856@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Korean text in the web UI can render in a Chinese font.
Geist and Lora cover Latin only. The Korean system faces in the
:lang(ko)stacks (Nanum, Malgun Gothic, Apple SD Gothic Neo) are often missing, especially on Linux and on Windows without Korean language packs. When they are missing, Hangul falls through to a Chinese face. Korean comments inside code blocks hit the same problem through the monospace stacks.This PR ships a Hangul-only webfont and puts it right after the Latin webfont in each stack.
web/app/fonts/hangul-sans-variable.woff2: a Hangul-only subset of Pretendard Variable 1.3.9 (SIL OFL 1.1). "Pretendard" is a Reserved Font Name under the OFL, so the subset is renamed to "Hangul Sans". The license is inweb/app/fonts/OFL.txt.web/app/layout.tsxloads it withnext/font/localas--font-hangul. It hasunicode-rangeset to the Hangul blocks andpreload: false, so a page with no Korean text never downloads it.--font-hangulfollows--font-sans/--font-serifin the Tailwindsansandserifstacks, the:lang(ko)stacks inglobals.css, and the notes, favorites and SVG stacks. Latin stays Geist or Lora, and Hanzi and kana still resolve to the faces after it. That keeps the ordering rule from fix(web): language-aware CJK font stacks for chat prose #2541 intact.monostack and the inlineMONOSPACEstack inRichCodeBlock.tsxadd--font-hangulbefore the genericmonospace.Related Issues
Module(s) Affected
web(Frontend)testsChecklist
dev(notmain— see the base-branch selector above).pre-commit run --all-filesand fixed any issues. (Run on this branch's changed files; it fixed trailing whitespace in the license file.)Additional Notes
Evidence, all on this branch rebased onto
dev:npm run test:node: 1441 tests, 1441 pass.content-lang-cjk-fonts.test.tsnow also checks that--font-hangulcomes before the Korean system faces in.prose:lang(ko)and.font-sans:lang(ko).npm run typecheckpasses.eslinton the changed TS/JS files passes.wghtaxis is 45–930, which matchesweight: "45 930"inlayout.tsx.Cost: the file is 1.7 MB. The browser fetches it only on pages with Hangul on screen, because of
unicode-range, and it is not preloaded.No screenshot yet. I tested on macOS, where Apple SD Gothic Neo is present, so the broken fallback does not reproduce there. I can add before/after screenshots from a Linux or Windows machine without Korean fonts if that helps the review.
AI-assisted. I have read and understand the change.
🤖 Generated with Claude Code