pub enum FontSlot {
Mono,
Sans,
Display,
}Expand description
Layer 0 of the font model, re-exported for the same one-dependency reason.
A build script composing an override needs all four names and has no other
reason to depend on makeover directly.
A slot in the house font vocabulary — the unit an override replaces.
Three, and the third is deliberately empty by default: display is the
brand tier, it has no house answer, and a product that does not override it
leaves the token undefined so whatever the consumer wrote as a fallback
renders. The MNW embeds rely on exactly that.
Variants§
Mono
Code, data, identifiers, cell grids. FONT_MONO by default.
Sans
Body and UI text: everything that is not mono or brand. FONT_SANS.
Display
The brand / display tier. No house default, per cdf8ac09.
Implementations§
Source§impl FontSlot
impl FontSlot
Sourcepub fn house_default(self) -> Option<&'static str>
pub fn house_default(self) -> Option<&'static str>
The house stack, or None for the brand tier.
Sourcepub fn house_face(self) -> Option<FontFace>
pub fn house_face(self) -> Option<FontFace>
The house face behind that stack, or None for the brand tier.
The counterpart of house_default, and the same
split as Typography::resolve against Typography::faces: one
names the family that wins, the other names the file behind it. The
house tier was a format string until this existed, so it could be
emitted and not read — which made Typography::faces answer for the
brand tier and stay silent about the other two.
The sources are the web copies, and that is the whole of what the
house tier ships today. A renderer loading a face directly wants a
ttf, and there is no house ttf under any name to hand it.