// bezel = { version = "0.2", features = ["geist-sans", "geist-mono"] }
use theme::{AppExt as _, TextStyle, Theme, Typeset as _};
ui::register_fonts(cx).ok();
cx.set_palette(|appearance| {
let mut theme = Theme::for_appearance(appearance);
theme.font_sans = "Geist".into();
theme
});
cx.set_base_text_size(14.0);
div().font_family(theme.font_mono.clone()).text_style(TextStyle::Callout)- Registering a face does not select it.
font_sans,font_bodyandfont_mononame the family the file declares; until set, the platform's own faces paint. - Your own font files go through
ui::fonts::add. In a browser, a face given tocx.text_system().add_fontsdirectly paints text but is missing from SVG. geist-weightsadds static 500/600/700 Geist faces for the cosmic-text (Linux) path, which paints a variable font at 400. Geist Mono has no statics.set_base_text_sizemoves everyTextStylerole and the metrics keyed to it together.