Struct style::font_metrics::FontMetrics
source · pub struct FontMetrics {
pub x_height: Option<Length>,
pub zero_advance_measure: Option<Length>,
pub cap_height: Option<Length>,
pub ic_width: Option<Length>,
pub ascent: Length,
}
Expand description
Represents the font metrics that style needs from a font to compute the
value of certain CSS units like ex
.
Fields§
§x_height: Option<Length>
The x-height of the font.
zero_advance_measure: Option<Length>
The zero advance. This is usually writing mode dependent
cap_height: Option<Length>
The cap-height of the font.
ic_width: Option<Length>
The ideographic-width of the font.
ascent: Length
The ascent of the font (a value is always available for this).
Trait Implementations§
source§impl Clone for FontMetrics
impl Clone for FontMetrics
source§fn clone(&self) -> FontMetrics
fn clone(&self) -> FontMetrics
Returns a copy 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 FontMetrics
impl Debug for FontMetrics
source§impl Default for FontMetrics
impl Default for FontMetrics
source§impl PartialEq<FontMetrics> for FontMetrics
impl PartialEq<FontMetrics> for FontMetrics
source§fn eq(&self, other: &FontMetrics) -> bool
fn eq(&self, other: &FontMetrics) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FontMetrics
Auto Trait Implementations§
impl RefUnwindSafe for FontMetrics
impl Send for FontMetrics
impl Sync for FontMetrics
impl Unpin for FontMetrics
impl UnwindSafe for FontMetrics
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert