From 8350b77511a3e39e7eb4ad6597f7b39052039774 Mon Sep 17 00:00:00 2001 From: pdelfan Date: Thu, 15 Oct 2026 10:46:12 -0700 Subject: [PATCH] The UI and code fonts are each a native stack that covers every platform, so the app loads no web fonts. The sans drops ui-sans-serif, which only Safari reads, and "SF Pro Text", which system-ui already reaches, names Helvetica and Arial for Linux, where they map to lookalikes, and ends with the emoji fonts of each platform after sans-serif, Noto Color Emoji among them for Linux and Android. The mono gives SF Mono in Safari and on iOS through ui-monospace, Menlo in Chrome and Firefox on a Mac, which can't reach SF Mono, Cascadia Mono or Consolas on Windows, and Liberation Mono or DejaVu Sans Mono on Linux, and no longer names JetBrains Mono, which is only there when someone installed it. --- apps/web/src/styles/theme.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/web/src/styles/theme.css b/apps/web/src/styles/theme.css index f9466c3..15e497d 100644 --- a/apps/web/src/styles/theme.css +++ b/apps/web/src/styles/theme.css @@ -171,11 +171,15 @@ --color-code-token-inserted: var(--color-code-token-string); --color-code-token-deleted: light-dark(oklch(0.52 0.19 25), oklch(0.72 0.15 25)); + /* The system's own fonts, so the app loads none: its sans, then each platform's emoji, and its + mono. */ --font-ui: - ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", - sans-serif; + system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-prose: var(--font-ui); - --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; + --font-mono: + ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", Consolas, "Liberation Mono", + "DejaVu Sans Mono", monospace; --default-font-family: var(--font-ui); --default-mono-font-family: var(--font-mono); -- knotmirror 0.0.1