diff --git a/extension/sidepanel-terminal.js b/extension/sidepanel-terminal.js index e6287abca..bf041d412 100644 --- a/extension/sidepanel-terminal.js +++ b/extension/sidepanel-terminal.js @@ -391,7 +391,13 @@ function ensureXterm() { if (term) return; term = new Terminal({ - fontFamily: '"JetBrains Mono", "SF Mono", Menlo, "Noto Sans Mono CJK KR", "Malgun Gothic", monospace', + // Windows Latin monospace (Consolas, always present; Cascadia ships with Terminal/VS) + // MUST precede the CJK fallbacks: xterm sizes the character cell from the first + // resolved font's advance width, and Malgun Gothic (the Windows Korean UI font, the + // first that resolves here when the Mac/Linux fonts are absent) advances Latin glyphs + // in a full-width CJK cell — doubling every cell into spaced-out text. The CJK fonts + // stay last for actual CJK glyph coverage. + fontFamily: '"JetBrains Mono", "SF Mono", "Cascadia Mono", "Cascadia Code", Consolas, Menlo, "DejaVu Sans Mono", "Noto Sans Mono CJK KR", "Malgun Gothic", monospace', fontSize: 13, theme: { background: '#0a0a0a', foreground: '#e5e5e5' }, cursorBlink: true, diff --git a/extension/sidepanel.css b/extension/sidepanel.css index 0bc306b25..69fe81106 100644 --- a/extension/sidepanel.css +++ b/extension/sidepanel.css @@ -38,7 +38,9 @@ /* Typography */ --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; - --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', 'Noto Sans Mono CJK KR', 'Malgun Gothic', monospace; + /* Consolas (always on Windows) before the CJK fallbacks — else Latin text resolves to + Malgun Gothic and renders full-width/spaced-out. Same fix as the xterm fontFamily. */ + --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Mono', 'Cascadia Code', Consolas, 'DejaVu Sans Mono', 'Noto Sans Mono CJK KR', 'Malgun Gothic', monospace; /* Radius */ --radius-sm: 4px;