diff --git a/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts b/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts index 64ba7c8ef..1e5d4d275 100644 --- a/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts +++ b/apps/desktop/src/app/right-sidebar/terminal/use-terminal-session.ts @@ -328,13 +328,19 @@ export function useTerminalSession({ cwd, onAddSelectionToChat }: UseTerminalSes const term = new Terminal({ allowProposedApi: true, - allowTransparency: true, + // Opaque canvas = WebGL's crisp fast-path. allowTransparency instead bakes + // glyphs as grayscale-alpha for compositing over a see-through canvas, which + // reads soft on every platform; VS Code keeps it off and our surface + // (--ui-bg-chrome) is opaque anyway, so withSurface paints it solid. + allowTransparency: false, convertEol: true, cursorBlink: true, fontFamily: "'JetBrains Mono', 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace", fontSize: 11, - fontWeight: '500', - fontWeightBold: '700', + // VS Code's terminal renders 'normal'/'bold' (400/700); we were using Medium + // (500) as the base, which reads a touch heavy at this size. + fontWeight: 'normal', + fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.12, // Full-screen TUIs (hermes --tui, vim) grab the mouse, so a plain drag @@ -617,12 +623,12 @@ export function useTerminalSession({ cwd, onAddSelectionToChat }: UseTerminalSes startSession() } - // fonts.ready settles only already-requested faces; the regular (500), + // fonts.ready settles only already-requested faces; the regular (400), // bold (700) and italic aren't asked for until styled output paints (past // atlas init), so warm them up front — otherwise the WebGL atlas bakes a // fallback face and the terminal renders thin until a repaint. const warm = document.fonts?.load - ? Promise.allSettled(['500', '700', 'italic 500'].map(v => document.fonts.load(`${v} 11px 'JetBrains Mono'`))) + ? Promise.allSettled(['400', '700', 'italic 400'].map(v => document.fonts.load(`${v} 11px 'JetBrains Mono'`))) : Promise.resolve() void warm.then(mount, mount) diff --git a/apps/desktop/src/fonts/JetBrainsMono-Medium.woff2 b/apps/desktop/src/fonts/JetBrainsMono-Medium.woff2 deleted file mode 100644 index 669d04cdf..000000000 Binary files a/apps/desktop/src/fonts/JetBrainsMono-Medium.woff2 and /dev/null differ diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.css index 86b2205c6..31f7c2025 100644 --- a/apps/desktop/src/styles.css +++ b/apps/desktop/src/styles.css @@ -26,13 +26,6 @@ font-display: swap; src: url('./fonts/JetBrainsMono-Regular.woff2') format('woff2'); } -@font-face { - font-family: 'JetBrains Mono'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: url('./fonts/JetBrainsMono-Medium.woff2') format('woff2'); -} @font-face { font-family: 'JetBrains Mono'; font-style: normal;