pub struct ScaledGlyph<'font> { /* private fields */ }
Expand description
A glyph augmented with scaling information. You can query such a glyph for information that depends on the scale of the glyph.
Implementations§
Source§impl<'font> ScaledGlyph<'font>
impl<'font> ScaledGlyph<'font>
Sourcepub fn into_unscaled(self) -> Glyph<'font>
pub fn into_unscaled(self) -> Glyph<'font>
A reference to this glyph without the scaling
Sourcepub fn build_outline(&self, builder: &mut impl OutlineBuilder) -> bool
pub fn build_outline(&self, builder: &mut impl OutlineBuilder) -> bool
Builds the outline of the glyph with the builder specified. Returns
false
when the outline is either malformed or empty.
Sourcepub fn positioned(self, p: Point<f32>) -> PositionedGlyph<'font>
pub fn positioned(self, p: Point<f32>) -> PositionedGlyph<'font>
Augments this glyph with positioning information, making methods that depend on the position of the glyph available.
pub fn scale(&self) -> Scale
Sourcepub fn h_metrics(&self) -> HMetrics
pub fn h_metrics(&self) -> HMetrics
Retrieves the “horizontal metrics” of this glyph. See HMetrics
for
more detail.
Sourcepub fn exact_bounding_box(&self) -> Option<Rect<f32>>
pub fn exact_bounding_box(&self) -> Option<Rect<f32>>
The bounding box of the shape of this glyph, not to be confused with
pixel_bounding_box
, the conservative pixel-boundary bounding box. The
coordinates are relative to the glyph’s origin.
Trait Implementations§
Source§impl<'font> Clone for ScaledGlyph<'font>
impl<'font> Clone for ScaledGlyph<'font>
Source§fn clone(&self) -> ScaledGlyph<'font>
fn clone(&self) -> ScaledGlyph<'font>
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 moreAuto Trait Implementations§
impl<'font> Freeze for ScaledGlyph<'font>
impl<'font> RefUnwindSafe for ScaledGlyph<'font>
impl<'font> Send for ScaledGlyph<'font>
impl<'font> Sync for ScaledGlyph<'font>
impl<'font> Unpin for ScaledGlyph<'font>
impl<'font> UnwindSafe for ScaledGlyph<'font>
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