Struct swash::proxy::MetricsProxy
source · pub struct MetricsProxy { /* private fields */ }
Expand description
Proxy for rematerializing metrics.
Implementations§
source§impl MetricsProxy
impl MetricsProxy
sourcepub fn materialize_metrics(
&self,
font: &FontRef<'_>,
coords: &[NormalizedCoord],
) -> Metrics
pub fn materialize_metrics( &self, font: &FontRef<'_>, coords: &[NormalizedCoord], ) -> Metrics
Materializes font metrics for the specified font and normalized variation coordinates. This proxy must have been created from the same font.
sourcepub fn materialize_glyph_metrics<'a>(
&self,
font: &FontRef<'a>,
coords: &'a [NormalizedCoord],
) -> GlyphMetrics<'a>
pub fn materialize_glyph_metrics<'a>( &self, font: &FontRef<'a>, coords: &'a [NormalizedCoord], ) -> GlyphMetrics<'a>
Materializes glyph metrics for the specified font and normalized variation coordinates. This proxy must have been created from the same font.
sourcepub fn units_per_em(&self) -> u16
pub fn units_per_em(&self) -> u16
Returns the number of font design units per em unit.
sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Returns the number of glyphs in the font.
Trait Implementations§
source§impl Clone for MetricsProxy
impl Clone for MetricsProxy
source§fn clone(&self) -> MetricsProxy
fn clone(&self) -> MetricsProxy
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 Default for MetricsProxy
impl Default for MetricsProxy
source§fn default() -> MetricsProxy
fn default() -> MetricsProxy
Returns the “default value” for a type. Read more
impl Copy for MetricsProxy
Auto Trait Implementations§
impl Freeze for MetricsProxy
impl RefUnwindSafe for MetricsProxy
impl Send for MetricsProxy
impl Sync for MetricsProxy
impl Unpin for MetricsProxy
impl UnwindSafe for MetricsProxy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)