Struct femtovg::FontMetrics
source · [−]pub struct FontMetrics { /* private fields */ }
Expand description
Information about a font.
Implementations
sourceimpl FontMetrics
impl FontMetrics
sourcepub fn descender(&self) -> f32
pub fn descender(&self) -> f32
The distance from the baseline to the bottom of the lowest descenders on the glyphs
pub fn height(&self) -> f32
pub fn regular(&self) -> bool
pub fn italic(&self) -> bool
pub fn bold(&self) -> bool
pub fn oblique(&self) -> bool
pub fn variable(&self) -> bool
pub fn weight(&self) -> u16
pub fn width(&self) -> u16
Trait Implementations
sourceimpl Clone for FontMetrics
impl Clone for FontMetrics
sourcefn clone(&self) -> FontMetrics
fn clone(&self) -> FontMetrics
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FontMetrics
impl Debug for FontMetrics
sourceimpl Default for FontMetrics
impl Default for FontMetrics
sourcefn default() -> FontMetrics
fn default() -> FontMetrics
Returns the “default value” for a type. Read more
impl Copy 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more