Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: use the macOS system font (SF Pro) as the default UI font on Mac (#16402)
Michael Han76033a7cd1ab
diff --git a/studio/frontend/public/theme-boot.js b/studio/frontend/public/theme-boot.jsindex 0f0363f5284..cddecda3b72 100644--- a/studio/frontend/public/theme-boot.js+++ b/studio/frontend/public/theme-boot.js@@ -30,6 +30,14 @@ try {}} catch (e) {}+// macOS defaults the UI font to the system font (index.css html.client-mac); set before+// first paint so Inter never flashes. Follows the browser OS, not the possibly remote server.+try {+ if (/Macintosh/.test(navigator.userAgent)) {+ document.documentElement.classList.add("client-mac");+ }+} catch (e) {}+// One screen pixel in CSS px, for slider tracks (index.css); re-run when the zoom changes.try {(function px() {diff --git a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsxindex fac5237173f..c2c5cf70b19 100644--- a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx+++ b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx@@ -118,10 +118,18 @@ export function ActiveColorControl({}/* ------------------------------ Typography ------------------------------ */+// Mirrors html.client-mac (theme-boot.js), which swaps the sans default to the system font.+const SYSTEM_SANS_NAME = "SF Pro";+const DEFAULT_SANS_NAME =+ typeof document !== "undefined" &&+ document.documentElement.classList.contains("client-mac")+ ? SYSTEM_SANS_NAME+ : "Inter Variable";+const DEFAULT_FONT_NAMES = {- ui: "Inter Variable",+ ui: DEFAULT_SANS_NAME,heading: "Hellix",- chat: "Inter Variable",+ chat: DEFAULT_SANS_NAME,code: "JetBrains Mono",} as const;@@ -216,6 +224,13 @@ function detectFontsByMeasurement(candidates: string[]): string[] {);}+// The system font has no addressable family name, so preview it through the token.+function previewFamily(font: string): string {+ return font === SYSTEM_SANS_NAME+ ? "var(--font-sans-default)"+ : `"${font}", var(--font-sans)`;+}+let deviceFontsCache: string[] | null = null;async function loadDeviceFonts(): Promise<string[]> {@@ -321,7 +336,7 @@ function FontSelect({><spanclassName="min-w-0 truncate"- style={{ fontFamily: `"${value ?? defaultFont}", var(--font-sans)` }}+ style={{ fontFamily: previewFamily(value ?? defaultFont) }}>{value ?? defaultLabel}</span>@@ -350,7 +365,7 @@ function FontSelect({data-checked={value === null}className="cursor-pointer rounded-md">- <span style={{ fontFamily: `"${defaultFont}", var(--font-sans)` }}>+ <span style={{ fontFamily: previewFamily(defaultFont) }}>{defaultLabel}</span></CommandItem>diff --git a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts b/studio/frontend/src/features/settings/stores/appearance-custom-store.tsindex f83c638773d..33e5fdfabcc 100644--- a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts+++ b/studio/frontend/src/features/settings/stores/appearance-custom-store.ts@@ -620,8 +620,8 @@ export const useAppearanceCustomStore = create<AppearanceCustomState>()();/* ------------------------------ DOM applier ------------------------------ */-const DEFAULT_SANS_STACK =- '"Inter Variable", ui-sans-serif, sans-serif, system-ui';+// Platform default from index.css: Inter, or the system font on macOS.+const DEFAULT_SANS_STACK = "var(--font-sans-default)";const DEFAULT_HEADING_STACK ='"Hellix", "Space Grotesk Variable", var(--font-sans)';const DEFAULT_MONO_STACK = "JetBrains Mono, monospace";diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.cssindex ac87b1a37e0..12e7ab9a62e 100644--- a/studio/frontend/src/index.css+++ b/studio/frontend/src/index.css@@ -329,7 +329,9 @@--sidebar-border-base: #f2f2f2;--sidebar-ring: #262626;--destructive-foreground: oklch(1 0 0);- --font-sans: "Inter Variable", ui-sans-serif, sans-serif, system-ui;+ /* Inter everywhere but macOS, where html.client-mac (theme-boot.js) swaps in the system font. */+ --font-sans-default: "Inter Variable", ui-sans-serif, sans-serif, system-ui;+ --font-sans: var(--font-sans-default);--font-heading: "Hellix", "Space Grotesk Variable", var(--font-sans);--font-serif: Source Serif 4, serif;--font-mono: JetBrains Mono, monospace;@@ -447,6 +449,11 @@--icon-btn-inset: calc((2rem * var(--ui-space-scale, 1) - var(--icon-size)) / 2);}+/* SF Pro can't be bundled; Inter stays as the fallback. */+html.client-mac {+ --font-sans-default: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter Variable", ui-sans-serif, sans-serif;+}+.dark {/* A faint shadow needs more alpha to read on a dark page. */--popup-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.7);@@ -503,7 +510,6 @@--sidebar-border-base: #3a3a3a;--sidebar-ring: #dfdfdf;--destructive-foreground: oklch(1 0 0);- --font-sans: "Inter Variable", ui-sans-serif, sans-serif, system-ui;--font-serif: Source Serif 4, serif;--font-mono: JetBrains Mono, monospace;--shadow-color: hsl(0 0% 0%);@@ -2159,9 +2165,9 @@ html[data-chat-font] .aui-root {height: var(--icon-size);}- /* Pins Inter across themes; parent `font-heading` resolves to Geist in dark. */+ /* Pins the default sans across themes; parent `font-heading` resolves to Geist in dark. */.nav-badge {- font-family: "Inter Variable", ui-sans-serif, system-ui, sans-serif;+ font-family: var(--font-sans-default);}.sidebar-nav-btn {