Skip to content

fix(chat): use the editor monospace for conversation code - #810

Open
Frank-zhu0404 wants to merge 1 commit into
xintaofei:mainfrom
Frank-zhu0404:fix/issue-761-codeblock-monospace
Open

Frank-zhu0404 wants to merge 1 commit into
xintaofei:mainfrom
Frank-zhu0404:fix/issue-761-codeblock-monospace

Conversation

@Frank-zhu0404

Copy link
Copy Markdown
Contributor

Replacement PR: restores CLOSED #799 after fork deletion (same HEAD ebfb2ac5633c). Prior: #799

Fenced blocks, inline code, and CodeBlock followed Tailwind's default mono stack. On macOS and Chinese Windows the generic monospace face paints Han glyphs as Songti, which is what #761 is looking at.

The editor face is now published as --font-code (prehydrated from the stored stack, same path as --font-sans). Conversation code uses that stack with the trailing generic monospace replaced by CJK UI faces, so Latin stays on the settings mono and Han no longer falls through to Songti. Monaco and the terminal keep their own stacks, and the rest of the UI's font-mono is unchanged.

Testing

  • pnpm lint . → exit 0
  • pnpm test → 501 files / 7383 tests passed
  • New coverage: conversation-code-font selectors, --font-code publication / appearance script, font-presets CJK stack helper, appearance-provider wiring

Closes #761

Fenced blocks, inline code, and CodeBlock followed Tailwind's default
mono stack. On macOS and Chinese Windows the generic monospace face
paints Han glyphs as Songti, which is what xintaofei#761 is looking at.

The editor face is now published as --font-code (prehydrated from the
stored stack, same path as --font-sans). Conversation code uses that
stack with the trailing generic monospace replaced by CJK UI faces, so
Latin stays on the settings mono and Han no longer falls through to
Songti. Monaco and the terminal keep their own stacks, and the rest of
the UI's font-mono is unchanged.

Closes xintaofei#761
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