Skip to content

Commit 044970f

Browse files
committed
Add terminal Nerd Font fallbacks
1 parent f9372a4 commit 044970f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

apps/web/src/components/ThreadTerminalDrawer.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ import { selectTerminalEventEntries, useTerminalStateStore } from "../terminalSt
4242
const MIN_DRAWER_HEIGHT = 180;
4343
const MAX_DRAWER_HEIGHT_RATIO = 0.75;
4444
const MULTI_CLICK_SELECTION_ACTION_DELAY_MS = 260;
45+
const TERMINAL_FONT_FAMILY = [
46+
'"SF Mono"',
47+
'"SFMono-Regular"',
48+
"Consolas",
49+
'"Liberation Mono"',
50+
"Menlo",
51+
// Keep the default terminal fonts first; Nerd Font fallbacks cover prompt glyphs when available.
52+
'"MesloLGS NF"',
53+
'"JetBrainsMono Nerd Font Mono"',
54+
'"JetBrainsMono NF"',
55+
"monospace",
56+
].join(", ");
4557

4658
function maxDrawerHeight(): number {
4759
if (typeof window === "undefined") return DEFAULT_THREAD_TERMINAL_HEIGHT;
@@ -303,7 +315,7 @@ export function TerminalViewport({
303315
lineHeight: 1.2,
304316
fontSize: 12,
305317
scrollback: 5_000,
306-
fontFamily: '"SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',
318+
fontFamily: TERMINAL_FONT_FAMILY,
307319
theme: terminalThemeFromApp(mount),
308320
});
309321
terminal.loadAddon(fitAddon);

0 commit comments

Comments
 (0)