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.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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),
|
||||
])
|
||||
}
|
||||
Reference in New Issue
Block a user