mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
c941038e68
* Bundle Symbols Nerd Font Mono as terminal icon fallback PR #845 added "Symbols Nerd Font Mono" to the terminal fontFamily fallback chain so PUA glyphs (powerline / devicons / etc.) resolve even when the user's primary font lacks them. That only worked if the user had separately installed the symbol font; ship it ourselves so icons render out of the box regardless of the chosen base font. - Drop SymbolsNerdFontMono-Regular.ttf into public/fonts (~2.5 MB); Vite copies it to dist/fonts and the existing app:// protocol handler already knows the font/ttf MIME type. - Register an @font-face in index.css pointing at the bundled file. font-display: block prevents tofu while the (instantly-available bundled) face loads, only affecting PUA glyphs since the base font is listed earlier in the fallback chain. - Include the upstream LICENSE next to the font. Source: ryanoasis/nerd-fonts NerdFontsSymbolsOnly v3.4.0 (MIT). Refs #843 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Reference bundled font by absolute path so prod build resolves Address Codex P2 on PR #846: the relative `./fonts/...` URL was emitted verbatim into dist/assets/index-*.css, where the browser resolved it against the CSS file's location and 404'd on dist/assets/fonts/SymbolsNerdFontMono-Regular.ttf — the actual file lives in dist/fonts/, so the icon fallback never loaded in packaged builds and Nerd Font glyphs still rendered as tofu. Switch the @font-face url() to `/fonts/...`. Vite's `base: "./"` config rewrites that to the correct dist-relative form during build (`../fonts/SymbolsNerdFontMono-Regular.ttf` from dist/assets/), and in dev the same path is served by the Vite dev server out of public/. Verified by re-running `vite build` and grepping the produced CSS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>