Bundle Geist as the body sans

The design's `--ely-font-sans` is Geist; we were registering only
Newsreader. Body text everywhere fell through to GPUI's
`.SystemUIFont` (SF Pro on macOS) — too humanist for the geometric,
calm tech aesthetic the design wants.

Bundle Geist-Regular (SIL OFL 1.1, 126 KB), register it alongside
Newsreader, and set the root window's `.font_family(SANS_FAMILY)`.
SERIF_FAMILY callsites continue to override per element so headlines
keep using Newsreader.

Only Regular is bundled — GPUI synthesizes weights from the metrics,
so 500/600 still read correctly. Bold/italic file additions are a
later polish.
This commit is contained in:
2026-05-09 21:12:56 -04:00
parent ed2d8ffac2
commit 573eaae4a8
4 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -30,5 +30,5 @@ pub(crate) use split_pane::{
render_split_pane_header,
};
pub(crate) use topbar::render_topbar;
pub(crate) use typography::{SERIF_FAMILY, register_serif_fonts};
pub(crate) use typography::{SANS_FAMILY, SERIF_FAMILY, register_serif_fonts};
pub(crate) use wallpaper::render_wallpaper;
@@ -6,12 +6,23 @@ const NEWSREADER_REGULAR: &[u8] =
include_bytes!("../../../assets/fonts/Newsreader.ttf");
const NEWSREADER_ITALIC: &[u8] =
include_bytes!("../../../assets/fonts/Newsreader-Italic.ttf");
const GEIST_REGULAR: &[u8] =
include_bytes!("../../../assets/fonts/Geist-Regular.ttf");
pub(crate) const SERIF_FAMILY: &str = "Newsreader";
pub(crate) const SANS_FAMILY: &str = "Geist";
/// Register every bundled UI font with GPUI's text system.
///
/// Newsreader is the design's display serif (Hero headlines, settings
/// titles, reading-list cover). Geist is the design's body sans —
/// without it GPUI falls back to `.SystemUIFont` (SF Pro on macOS),
/// which is too humanist for the geometric calm tech aesthetic the
/// design specifies.
pub(crate) fn register_serif_fonts(cx: &App) -> gpui::Result<()> {
cx.text_system().add_fonts(vec![
Cow::Borrowed(NEWSREADER_REGULAR),
Cow::Borrowed(NEWSREADER_ITALIC),
Cow::Borrowed(GEIST_REGULAR),
])
}