diff --git a/crates/ely_app/assets/fonts/Geist-Regular.ttf b/crates/ely_app/assets/fonts/Geist-Regular.ttf new file mode 100644 index 0000000..bd8775f Binary files /dev/null and b/crates/ely_app/assets/fonts/Geist-Regular.ttf differ diff --git a/crates/ely_app/src/shell/chrome/mod.rs b/crates/ely_app/src/shell/chrome/mod.rs index 4c26f2d..daab449 100644 --- a/crates/ely_app/src/shell/chrome/mod.rs +++ b/crates/ely_app/src/shell/chrome/mod.rs @@ -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; diff --git a/crates/ely_app/src/shell/chrome/typography.rs b/crates/ely_app/src/shell/chrome/typography.rs index edb6fc4..e098225 100644 --- a/crates/ely_app/src/shell/chrome/typography.rs +++ b/crates/ely_app/src/shell/chrome/typography.rs @@ -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), ]) } diff --git a/crates/ely_app/src/shell/render.rs b/crates/ely_app/src/shell/render.rs index c88dd75..64e5505 100644 --- a/crates/ely_app/src/shell/render.rs +++ b/crates/ely_app/src/shell/render.rs @@ -9,7 +9,7 @@ use gpui::{ use super::chrome::command_match::visible_command_rows; use super::chrome::{ - panel_bg, panel_shadow, render_command_overlay, + SANS_FAMILY, panel_bg, panel_shadow, render_command_overlay, render_topbar as render_topbar_chrome, render_wallpaper, }; use super::sidebar::collapsed_sidebar_active; @@ -69,6 +69,7 @@ impl ElyShell { .on_action(cx.listener(Self::on_zoom_out)) .on_mouse_move(cx.listener(Self::on_window_mouse_move)) .capture_key_down(cx.listener(Self::on_command_overlay_key_down)) + .font_family(SANS_FAMILY) .text_color(rgb(colors::INK)) .child(render_wallpaper(snapshot.appearance.wallpaper())) .child(