Skip to main content

weight_alias

Function weight_alias 

Source
pub fn weight_alias(name: &str) -> Option<&str>
Expand description

The base glyph a weight-suffixed name aliases, or None if the name carries no suffix.

Only SF-template sources have true per-weight art, so only they stage __light/__bold assets. A plain SVG stages once and every weight resolves back to it here, which is what keeps .weight(…) from 404-ing on art that has no weight axis, without staging a byte-identical copy of every glyph per weight. (Before this, 38 of Day-Showcase’s 39 sources were staged three times over as identical copies.)

Day API ↩ Guides· daybrite.dev