Merge pull request #1 from stablyai/linux-support

This commit is contained in:
Neil 2026-03-19 12:44:45 -07:00 committed by GitHub
commit 30d4ad7508
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View File

@ -245,6 +245,11 @@ function buildTerminalFontSources(fontFamily: string) {
type: 'local' as const,
label: 'Menlo',
matchers: ['menlo', 'menlo regular']
},
{
type: 'local' as const,
label: 'Monospace fallback',
matchers: ['dejavu sans mono', 'liberation mono', 'ubuntu mono', 'monospace']
}
]
}
@ -615,7 +620,7 @@ export default function TerminalPane({
restty.closePane(id)
}
return {
renderer: 'webgpu',
renderer: 'auto',
fontSize: currentSettings?.terminalFontSize ?? 14,
fontSizeMode: 'em',
alphaBlending: 'native',

View File

@ -70,7 +70,21 @@ export function buildTerminalFontMatchers(fontFamily: string): string[] {
const trimmed = fontFamily.trim()
const normalized = trimmed.toLowerCase()
const matchers = trimmed ? [trimmed, normalized] : []
return Array.from(new Set([...matchers, 'sf mono', 'sfmono-regular', 'menlo', 'menlo regular']))
return Array.from(
new Set([
...matchers,
// macOS
'sf mono',
'sfmono-regular',
'menlo',
'menlo regular',
// Linux
'dejavu sans mono',
'liberation mono',
'ubuntu mono',
'monospace'
])
)
}
export function clampNumber(value: number, min: number, max: number): number {