Codex stop-hook #13: heading presets hardcoded Latin typography (lineHeight 1.0/1.1/1.2/1.25, display letterSpacing -0.5) and violated three documented CJK rules when called with Chinese/Japanese/Korean content: 1. memory project_pencil_optimization: "CJK headings 1.3-1.4 (NOT 1.1-1.2 like Latin)" 2. text-rules.md: "CJK letterSpacing: 0, NEVER negative. Negative letterSpacing causes CJK character overlap." 3. text-rules.md: "CJK font selection: heading=Noto Sans SC / Noto Sans JP / Noto Sans KR. NEVER Space Grotesk or Manrope — they have no CJK glyphs." Fix: same auto-CJK detection used by add_body_text_v0 (regex scan for \u3000-\u303f \u3040-\u309f \u30a0-\u30ff \u4e00-\u9fff \uac00-\ud7af). CJK content selects a separate preset table: display 48/700/1.3 Noto Sans SC (was 48/700/1.0/-0.5 Latin) h1 32/700/1.3 Noto Sans SC (was 32/700/1.1) h2 24/600/1.35 Noto Sans SC (was 24/600/1.2) h3 20/600/1.4 Noto Sans SC (was 20/600/1.25) All CJK presets drop letterSpacing entirely (never negative, never overridden from theme). Latin presets unchanged. Tests: 6 new CJK cases (zh/jp/ko/mixed/Latin-still-works + per-level lineHeight verification). Loop test uses unique filenames per iteration to sidestep openDocument cache reuse. 13/13 heading tests pass. 160/160 pen-mcp overall. format + tsc green. Bundle rebuilt. |
||
|---|---|---|
| .. | ||
| agent-native@e1f90cab96 | ||
| pen-acp | ||
| pen-ai-skills | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-mcp | ||
| pen-react | ||
| pen-renderer | ||
| pen-sdk | ||
| pen-types | ||
| CLAUDE.md | ||