pub struct FontOverride { /* private fields */ }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.
One product’s answer for one slot: the stack, and any faces it ships.
Implementations§
Source§impl FontOverride
impl FontOverride
Sourcepub fn new(slot: FontSlot, stack: impl Into<String>) -> FontOverride
pub fn new(slot: FontSlot, stack: impl Into<String>) -> FontOverride
Point slot at stack.
stack is the CSS value the token takes, written the way the house
stacks are: the family, then one hop to a system generic. Layer 2 is
still one hop and no further: an override is a different answer to the
slot, not a licence to write the fallback chain the standard deleted.
§Panics
If stack is not a font-family list (a comma-separated run of quoted
names or bare identifiers). This is emitted as the bare value of
--font-…, so unlike a quoted string it cannot be escaped, and a stack
that is not a family list would write into the stylesheet as code.
Sourcepub fn with_face(self, face: FontFace) -> FontOverride
pub fn with_face(self, face: FontFace) -> FontOverride
Ship a face with the override.
Trait Implementations§
Source§impl Clone for FontOverride
impl Clone for FontOverride
Source§fn clone(&self) -> FontOverride
fn clone(&self) -> FontOverride
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more