pub struct FontOverride { /* private fields */ }Expand description
Layer 0 of the font model, re-exported for a build script composing an override. 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Forget for FontOverride
impl Freeze for FontOverride
impl Move for FontOverride
impl RefUnwindSafe for FontOverride
impl Send for FontOverride
impl Sync for FontOverride
impl Unpin for FontOverride
impl UnsafeUnpin for FontOverride
impl UnwindSafe for FontOverride
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more