mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 00:19:42 +02:00
feat: bundled Nerd Font symbols fallback + per-device terminal font setting
Shell prompts using Nerd Font glyphs (powerline, p10k/starship folder and git icons) rendered as missing-glyph boxes: the built-in xterm stack has no private-use-area symbols, and phones have no Nerd Fonts installed at all. - Bundle Symbols Nerd Font Mono (icons-only, MIT, 1.2MB woff2) served from fonts/ and appended to the terminal stack before monospace — browsers fall back per glyph, so icons render everywhere while text stays in the text fonts. font-display: block + preload keep tofu out of xterm's glyph atlas. - New per-device terminalFontFamily setting (App Settings > Terminal & Input > Font): prepended to the built-in stack, never a replacement, so the symbols fallback and final monospace always survive. Applied live on save (refit + echo-overlay refreshFont, mirroring setFontSize). - Single source for both xterm surfaces: TERMINAL_FONT_DEFAULT_STACK + resolveTerminalFontFamily() in constants.js, unit-tested. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjnbbZRBuvR5E3SDouwXr9
This commit is contained in:
co-authored by
Claude Fable 5
parent
09bf00c815
commit
108c00e78d
@@ -16,6 +16,19 @@
|
||||
font-weight: 400 700;
|
||||
src: url('fonts/jetbrains-mono-variable.woff2') format('woff2');
|
||||
}
|
||||
/* Icons-only per-glyph fallback for the terminal (Symbols Nerd Font Mono, MIT,
|
||||
fonts/LICENSE-nerd-fonts.txt). Sits BEHIND the text fonts in the xterm stack
|
||||
(constants.js: TERMINAL_FONT_DEFAULT_STACK), so it only ever supplies the
|
||||
private-use-area glyphs shell prompts draw (powerline, p10k/starship folder
|
||||
and git icons) — text rendering is untouched. `block` display, not `swap`:
|
||||
there is no fallback that CAN render these glyphs, so swapping in tofu first
|
||||
would poison xterm's glyph atlas until the next re-render. */
|
||||
@font-face {
|
||||
font-family: 'Symbols Nerd Font Mono';
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
src: url('fonts/symbols-nerd-font-mono.woff2') format('woff2');
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Dark is the safe fallback. Light skins override this so native selects,
|
||||
|
||||
Reference in New Issue
Block a user