Skip to content

fix(i18n): CJK dashes and ellipses display correctly (5.4.1) - #103

Merged
linxule merged 1 commit into
mainfrom
fix/cjk-dash
Oct 10, 2026
Merged

linxule merged 1 commit into
mainfrom
fix/cjk-dash

Conversation

@linxule

@linxule linxule commented Oct 10, 2026

Copy link
Copy Markdown
Owner

In Chinese and Japanese text, the Latin web fonts supplied U+2014/U+2015/U+2026. So 我同意——开始访谈 showed two short, separated dashes, and …… showed as Latin dots. This affected the consent button, the researcher's consent text and the AI interviewer's replies.

  • On :lang(zh) and :lang(ja), a local()-only face restricted to unicode-range: U+2014-2015, U+2026 comes first in the sans, serif and mono stacks. It uses PingFang, Hiragino, YaHei or Noto CJK, whichever the device has; nothing is downloaded and English is unchanged.
  • Researcher transcript turns now carry the interview language as lang, so the fix applies there and screen readers pronounce the turn correctly.
  • Rendered before and after in Chrome with the site's own Public Sans; checked visually.
  • Test: selfHostedFonts.test.ts asserts the scoped faces, the code points, and that the faces have no url().
  • Version 5.4.1, release notes, README pointer.

npm run check:cloudflare: 20/20 lanes on a clean tree at the head commit.

🤖 Generated with Claude Code

In zh/ja text the Latin web fonts supplied U+2014/U+2015/U+2026, so 我同意——开始访谈
showed two separated short dashes and …… Latin dots. On :lang(zh) and :lang(ja),
a local()-only face with unicode-range U+2014-2015, U+2026 now comes first in
the sans, serif and mono stacks; nothing is downloaded and English is
unchanged. Researcher transcript turns carry the interview language as lang,
so the fix (and screen-reader pronunciation) applies there too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@linxule
linxule merged commit 646f087 into main Oct 10, 2026
6 checks passed
@linxule
linxule deleted the fix/cjk-dash branch October 10, 2026 14:40
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