Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(typography): real Inter italic + variable Geist Mono on desktop (MUL-5449) (#6105)

Jiayuan Zhang4f7048003952
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index 7dbe784638..1077a15325 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -39,9 +39,9 @@
"@dnd-kit/utilities": "^3.2.2",
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
+ "@fontsource-variable/geist-mono": "^5.3.0",
"@fontsource-variable/inter": "^5.2.5",
"@fontsource-variable/source-serif-4": "^5.2.9",
- "@fontsource/geist-mono": "^5.2.7",
"@multica/core": "workspace:*",
"@multica/ui": "workspace:*",
"@multica/views": "workspace:*",
diff --git a/apps/desktop/src/renderer/src/globals.css b/apps/desktop/src/renderer/src/globals.css
index e67b990853..acb6c3f3c0 100644
--- a/apps/desktop/src/renderer/src/globals.css
+++ b/apps/desktop/src/renderer/src/globals.css
@@ -41,8 +41,8 @@
"Noto Sans CJK KR", sans-serif;
--font-serif: "Source Serif 4 Variable", "Source Serif 4", "Iowan Old Style",
"Apple Garamond", Baskerville, "Times New Roman", serif;
- --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
- monospace;
+ --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular,
+ Menlo, Consolas, monospace;
}
/* Japanese-scoped CJK override. Japanese Kanji share the Han Unicode block
diff --git a/apps/desktop/src/renderer/src/main.tsx b/apps/desktop/src/renderer/src/main.tsx
index a525a3a9a9..2ed0727594 100644
--- a/apps/desktop/src/renderer/src/main.tsx
+++ b/apps/desktop/src/renderer/src/main.tsx
@@ -1,16 +1,26 @@
import ReactDOM from "react-dom/client";
import App from "./App";
// Inter variable font covers all weights (100-900) in a single file.
-// Geist Mono kept as-is for code blocks; CJK is handled by system font fallback
-// (see globals.css --font-sans chain). Keep font stack in sync with apps/web/app/layout.tsx.
+// CJK is handled by system font fallback (see globals.css --font-sans chain).
+// Keep font stack in sync with apps/web/app/layout.tsx.
+// The italic axis ships as a separate file — without it the ~20 semantic italic
+// labels and every markdown <em>/blockquote render as synthesized oblique.
import "@fontsource-variable/inter";
+import "@fontsource-variable/inter/wght-italic.css";
// Editorial serif — matches web's next/font Source_Serif_4. Loaded app-wide so
// onboarding headings and any future editorial surface can use `font-serif`
// (see tokens.css @theme inline). Variable font = one file covers all weights.
import "@fontsource-variable/source-serif-4";
import "@fontsource-variable/source-serif-4/wght-italic.css";
-import "@fontsource/geist-mono/400.css";
-import "@fontsource/geist-mono/700.css";
+// Mono must be the variable cut, not discrete 400/700: web gets a variable Geist
+// Mono from next/font, so any weight desktop does not load silently snaps to the
+// nearest one it has and the same shared component renders at two different
+// weights. That was already true for `font-mono font-medium` (500 -> 400) in
+// chart.tsx, webhook-event-filter-section.tsx and keyboard-shortcuts-tab.tsx, and
+// for inline <code> inheriting 600 from a <strong>, heading or <th> in rendered
+// markdown (600 -> 700). One variable file covers 100-900 and closes the whole
+// class instead of chasing weights one at a time.
+import "@fontsource-variable/geist-mono";
import "./globals.css";
// react-grab: dev-only element inspector. Hold ⌘C (Mac) / Ctrl+C and click any
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index a080f802f5..477d3f99e3 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -24,8 +24,15 @@ import "./globals.css";
// stack), and a hashed family name can only be referenced from CSS via a variable.
// Keeping the CJK chain in CSS also keeps it CSP-safe and in sync with the desktop
// app, which defines the same chain in apps/desktop/src/renderer/src/globals.css.
+//
+// Italic is loaded explicitly: `style` defaults to `["normal"]`, and without a real
+// italic face the ~20 semantic italic labels (chat empty states, model-picker's
+// "Managed by runtime", dashboard/squad placeholders) plus every markdown <em> and
+// blockquote rendered as browser-synthesized oblique. Keep in sync with desktop's
+// `@fontsource-variable/inter/wght-italic.css` import.
const inter = Inter({
subsets: ["latin"],
+ style: ["normal", "italic"],
variable: "--font-inter",
});
// Mono font has no explicit CJK fallback: CJK chars in code blocks are inherently
diff --git a/packages/ui/styles/base.css b/packages/ui/styles/base.css
index 270a38a910..f96df89004 100644
--- a/packages/ui/styles/base.css
+++ b/packages/ui/styles/base.css
@@ -297,6 +297,24 @@ html[data-sidebar-resizing="true"] * {
* Native CSS text-autospace (Chrome 119+, Electron recent versions).
* Progressive enhancement: browsers that don't support it simply ignore the rule. */
text-autospace: ideograph-alpha ideograph-numeric;
+ /* `style` keyword = allow style synthesis, forbid weight synthesis.
+ *
+ * Weight OFF: every face we load has real weights — Inter, Source Serif 4
+ * and Geist Mono are all variable (100-900) on both platforms, and landing's
+ * 400-only Instrument Serif is never set to another weight. Synthesis can
+ * only make those worse, and on the CJK tail of `--font-sans` it is actively
+ * harmful: `font-bold` against PingFang SC (which stops at Semibold) makes
+ * Chromium smear a fake 700, and the added stroke weight closes up the
+ * counters of dense Han glyphs. Forbidding it picks real Semibold instead.
+ *
+ * Style ON, deliberately: `auto` only synthesizes when no real italic face
+ * matches, so now that Inter Italic is loaded on both platforms the real face
+ * already wins for all Latin UI text and markdown <em>. What is left
+ * synthesizing is exactly the two stacks that ship no italic at all — the CJK
+ * fallbacks and Geist Mono — and there `font-style: italic` has no other
+ * visual carrier. Forbidding it would silently flatten every Chinese <em>,
+ * every editor italic mark, and every hljs comment to upright. */
+ font-synthesis: style;
}
@media (max-width: 767px), (pointer: coarse) {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2cc450dac4..696903b2e3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -159,15 +159,15 @@ importers:
'@electron-toolkit/utils':
specifier: ^4.0.0
version: 4.0.0([email protected])
+ '@fontsource-variable/geist-mono':
+ specifier: ^5.3.0
+ version: 5.3.0
'@fontsource-variable/inter':
specifier: ^5.2.5
version: 5.2.8
'@fontsource-variable/source-serif-4':
specifier: ^5.2.9
version: 5.2.9
- '@fontsource/geist-mono':
- specifier: ^5.2.7
- version: 5.2.7
'@multica/core':
specifier: workspace:*
version: link:../../packages/core
@@ -2317,15 +2317,15 @@ packages:
'@floating-ui/[email protected]':
resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==}
+ '@fontsource-variable/[email protected]':
+ resolution: {integrity: sha512-vBbuwDEo9AkrqADMXOrlAR3DFcJi4/JxeuU43FoiQERnNwsfXNnvxvReZG02cQKmyk4DZkZdBZX3oTDvy2zBAw==}
+
'@fontsource-variable/[email protected]':
resolution: {integrity: sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==}
'@fontsource-variable/[email protected]':
resolution: {integrity: sha512-PPcxjLFk/fS0WHg79pDM2YNvz61kC+oYZ5cWZZyCS0DHpJncmuYOuiZAsvj4tDxlWPBEvxxcRLQQNmSaRbPkqw==}
- '@fontsource/[email protected]':
- resolution: {integrity: sha512-xVPVFISJg/K0VVd+aQN0Y7X/sw9hUcJPyDWFJ5GpyU3bHELhoRsJkPSRSHXW32mOi0xZCUQDOaPj1sqIFJ1FGg==}
-
'@formatjs/[email protected]':
resolution: {integrity: sha512-vPnriihkfK0lzoQGaXq+qXH23VsYyansRTkTgo2aTG0k1NjLFyZimFVdfj4C9JkSE5dm7CEngcQ5TTc1yAyBfQ==}
@@ -12172,12 +12172,12 @@ snapshots:
'@floating-ui/[email protected]': {}
+ '@fontsource-variable/[email protected]': {}
+
'@fontsource-variable/[email protected]': {}
'@fontsource-variable/[email protected]': {}
- '@fontsource/[email protected]': {}
-
'@formatjs/[email protected]': {}
'@formatjs/[email protected]':