Struct floem_cosmic_text::FontMetrics
source · pub struct FontMetrics {
pub units_per_em: u16,
pub is_monospace: bool,
pub ascent: f32,
pub descent: f32,
pub line_gap: f32,
pub cap_height: Option<f32>,
pub x_height: Option<f32>,
pub underline_offset: Option<f32>,
pub underline_size: Option<f32>,
pub strikeout_offset: Option<f32>,
pub strikeout_size: Option<f32>,
}
Expand description
Global font metrics.
Fields§
§units_per_em: u16
Number of font design units per em unit.
is_monospace: bool
True if the font is monospace.
ascent: f32
Distance from the baseline to the top of the alignment box.
descent: f32
Distance from the baseline to the bottom of the alignment box.
line_gap: f32
Recommended additional spacing between lines.
cap_height: Option<f32>
Distance from the baseline to the top of a typical English capital.
x_height: Option<f32>
Distance from the baseline to the top of the lowercase “x” or similar character.
underline_offset: Option<f32>
Recommended distance from the baseline to the top of an underline stroke.
underline_size: Option<f32>
Recommended thickness of an underline stroke.
strikeout_offset: Option<f32>
Recommended distance from the baseline to the top of a strikeout stroke.
strikeout_size: Option<f32>
Recommended thickness of a strikeout stroke.
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§fn default() -> FontMetrics
fn default() -> FontMetrics
Returns the “default value” for a type. Read more
impl Copy for FontMetrics
Auto Trait Implementations§
impl Freeze for FontMetrics
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> 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