openpencil/packages
Fini 303c2a3b5a fix(mcp): add_heading_v0 CJK content gets CJK-specific typography
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.
2026-04-19 20:26:34 +08:00
..
agent-native@e1f90cab96 chore(agent): bump agent-native to v0.4.0 release 2026-04-17 19:04:15 +08:00
pen-acp chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-ai-skills feat(mcp): add text_button + heading + body_text (12 → 15 element tools) 2026-04-19 20:17:16 +08:00
pen-core chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-engine chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-figma chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-mcp fix(mcp): add_heading_v0 CJK content gets CJK-specific typography 2026-04-19 20:26:34 +08:00
pen-react chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-renderer chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-sdk chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-types chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00