Files
ELY-Browser/crates/ely_app/src/shell/chrome/typography.rs
T
ZacharyZhang-NY ed3150f9ed Bundle Newsreader serif and apply to hero text
Embeds Newsreader (variable opsz/wght, OFL-licensed) into the
ely_app binary via include_bytes!, registers it through GPUI's
text_system at startup (chrome::typography::register_serif_fonts),
and exposes the SERIF_FAMILY constant for downstream surfaces.

Apply the family to every page hero where the design uses
ely-serif: home headline, settings/appearance headline, plugin
marketplace headline, sync headline, plugin detail name, and the
home reading-list cover headline. The OFL license file ships
alongside the .ttf assets to satisfy the font's redistribution
clause.
2026-05-09 18:57:40 -04:00

18 lines
485 B
Rust

use std::borrow::Cow;
use gpui::App;
const NEWSREADER_REGULAR: &[u8] =
include_bytes!("../../../assets/fonts/Newsreader.ttf");
const NEWSREADER_ITALIC: &[u8] =
include_bytes!("../../../assets/fonts/Newsreader-Italic.ttf");
pub(crate) const SERIF_FAMILY: &str = "Newsreader";
pub(crate) fn register_serif_fonts(cx: &App) -> gpui::Result<()> {
cx.text_system().add_fonts(vec![
Cow::Borrowed(NEWSREADER_REGULAR),
Cow::Borrowed(NEWSREADER_ITALIC),
])
}