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.
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. A native loader wants a ttf and
cuts its own through quasi-type, whose cut_native writes the file
and hands back the family, style and default weight to register it
under; there is no house ttf named here, and there should not be. This
crate is on crates.io and quasi-type is publish = false, so naming a
native file here would assert a path the web build does not write and
save the consumer nothing, since it still has to run the pipeline.
One hazard travels with that arrangement and is not solved: a native
consumer takes quasi-type as a git dep and pins a rev, so a stale pin
ships an older glyph set silently. Advance it deliberately.