From 5287fccdec4ddffc53469f1cf3c2aaa469c4eb6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sun, 10 May 2026 00:45:54 -0400 Subject: [PATCH] Fix Newsreader serif resolution by matching its real family name The bundled Newsreader.ttf is the 16pt optical-size cut: its TrueType name-id 1 reads "Newsreader 16pt", and "Newsreader" only appears in name-id 16. GPUI/cosmic-text matches by name-id 1, so every .font_family(SERIF_FAMILY) call site (hero headline, settings titles, plugin pages, recap) was silently falling back to the default sans. Setting SERIF_FAMILY to "Newsreader 16pt" pins the right font. --- crates/ely_app/src/shell/chrome/typography.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ely_app/src/shell/chrome/typography.rs b/crates/ely_app/src/shell/chrome/typography.rs index e098225..7300afc 100644 --- a/crates/ely_app/src/shell/chrome/typography.rs +++ b/crates/ely_app/src/shell/chrome/typography.rs @@ -9,7 +9,13 @@ const NEWSREADER_ITALIC: &[u8] = const GEIST_REGULAR: &[u8] = include_bytes!("../../../assets/fonts/Geist-Regular.ttf"); -pub(crate) const SERIF_FAMILY: &str = "Newsreader"; +/// The bundled Newsreader.ttf is the 16pt optical-size cut. GPUI's text +/// system matches by the font's TrueType name-id 1, which is +/// "Newsreader 16pt" for this file (the unqualified "Newsreader" only +/// appears in name-id 16). Using the wrong string silently falls back +/// to the default sans, so headings would render in Geist instead of +/// the design's display serif. +pub(crate) const SERIF_FAMILY: &str = "Newsreader 16pt"; pub(crate) const SANS_FAMILY: &str = "Geist"; /// Register every bundled UI font with GPUI's text system.