Struct skia_safe::FontMetrics
source · #[repr(C)]pub struct FontMetrics {
pub top: scalar,
pub ascent: scalar,
pub descent: scalar,
pub bottom: scalar,
pub leading: scalar,
pub avg_char_width: scalar,
pub max_char_width: scalar,
pub x_min: scalar,
pub x_max: scalar,
pub x_height: scalar,
pub cap_height: scalar,
/* private fields */
}
Fields§
§top: scalar
§ascent: scalar
§descent: scalar
§bottom: scalar
§leading: scalar
§avg_char_width: scalar
§max_char_width: scalar
§x_min: scalar
§x_max: scalar
§x_height: scalar
§cap_height: scalar
Implementations§
source§impl FontMetrics
impl FontMetrics
pub fn underline_thickness(&self) -> Option<scalar>
pub fn underline_position(&self) -> Option<scalar>
pub fn strikeout_thickness(&self) -> Option<scalar>
pub fn strikeout_position(&self) -> Option<scalar>
pub fn has_bounds(&self) -> bool
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
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 Copy for FontMetrics
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> 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