Skip to main content

SimplePass

Struct SimplePass 

Source
pub struct SimplePass<'a, 'v, S: Scale> {
Show 13 fields pub glyph: &'a SimpleGlyph<'a>, pub scaled: &'a mut [Point<S::Coord>], pub unscaled: &'a mut [Point<i32>], pub flags: &'a mut [PointFlags], pub contours: &'a [u16], pub phantom: [Point<S::Coord>; 4], pub deltas: DeltaBuffers<'a, S::Delta>, pub var_data: Option<GlyphVariationData<'v>>, pub varies: bool, pub coords: &'a [F2Dot14], pub gvar_scalars: &'a [Fixed], pub has_hvar: bool, pub is_hinted: bool,
}
Expand description

Everything Scale::load_simple_points needs beyond the glyph itself.

Fields§

§glyph: &'a SimpleGlyph<'a>

The glyph being read.

§scaled: &'a mut [Point<S::Coord>]

Output coordinates, sized for the glyph’s points plus phantom points.

§unscaled: &'a mut [Point<i32>]

Font unit coordinates, empty unless Scale::NEEDS_UNSCALED.

§flags: &'a mut [PointFlags]

Point flags, the same length as scaled.

§contours: &'a [u16]

Contour end points, already read and relative to this glyph.

§phantom: [Point<S::Coord>; 4]

The phantom points to append, in font units.

§deltas: DeltaBuffers<'a, S::Delta>

Delta and interpolation buffers, empty for a static instance.

§var_data: Option<GlyphVariationData<'v>>

The variation data to apply, or None if this glyph has none.

Has its own lifetime because it is invariant and cannot shrink to match the borrows above.

§varies: bool

True if the font varies, whatever this glyph has.

A glyph with no variation data still takes the delta path, on zeroed deltas, because the two paths round differently.

§coords: &'a [F2Dot14]

Normalized variation coordinates, empty for a static instance.

§gvar_scalars: &'a [Fixed]

Cached shared tuple scalars at coords.

§has_hvar: bool

True if the font has HVAR, which changes how FreeType rounds the deltas it applies to phantom points.

§is_hinted: bool

True if the loaded outline will be hinted.

Auto Trait Implementations§

§

impl<'a, 'v, S> !UnwindSafe for SimplePass<'a, 'v, S>

§

impl<'a, 'v, S> Freeze for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: Freeze,

§

impl<'a, 'v, S> RefUnwindSafe for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: RefUnwindSafe, <S as Scale>::Delta: RefUnwindSafe,

§

impl<'a, 'v, S> Send for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: Send, <S as Scale>::Delta: Send,

§

impl<'a, 'v, S> Sync for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: Sync, <S as Scale>::Delta: Sync,

§

impl<'a, 'v, S> Unpin for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: Unpin,

§

impl<'a, 'v, S> UnsafeUnpin for SimplePass<'a, 'v, S>
where <S as Scale>::Coord: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.