pub struct FontContext {
pub font_size: Length,
pub x_height: Length,
}Expand description
Context for resolving font-relative units
Contains the current font size and x-height needed to resolve em and ex units to absolute lengths.
Fields§
§font_size: LengthCurrent font size
x_height: LengthX-height of the current font (typically ~0.5em)
Implementations§
Source§impl FontContext
impl FontContext
Trait Implementations§
Source§impl Clone for FontContext
impl Clone for FontContext
Source§fn clone(&self) -> FontContext
fn clone(&self) -> FontContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FontContext
impl Debug for FontContext
Source§impl PartialEq for FontContext
impl PartialEq for FontContext
impl Copy for FontContext
impl Eq for FontContext
impl StructuralPartialEq for FontContext
Auto Trait Implementations§
impl Freeze for FontContext
impl RefUnwindSafe for FontContext
impl Send for FontContext
impl Sync for FontContext
impl Unpin for FontContext
impl UnsafeUnpin for FontContext
impl UnwindSafe for FontContext
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