Skip to main content

GlyphZone

Struct GlyphZone 

Source
pub struct GlyphZone<'a, C: PointCoord> {
    pub glyph: GlyphId,
    pub bytecode: &'a [u8],
    pub points: &'a mut [Point<C>],
    pub unscaled: &'a mut [Point<i32>],
    pub flags: &'a mut [PointFlags],
    pub contours: &'a [u16],
    pub phantom: &'a mut [Point<C>; 4],
    pub is_composite: bool,
    pub coords: &'a [F2Dot14],
}
Expand description

The points a Hinter works on, zone 1 in the specification’s terms.

Unlike OutlineRef this is mutable, stores its phantom points alongside the rest, and is not shifted by the left side bearing.

Fields§

§glyph: GlyphId

The glyph being hinted.

§bytecode: &'a [u8]

The glyph’s TrueType instructions.

§points: &'a mut [Point<C>]

Scaled points, including phantom points, which hinting moves.

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

The same points in font units.

§flags: &'a mut [PointFlags]

The flag for each point, which hinting also marks up.

§contours: &'a [u16]

Contour end points, relative to the start of points.

§phantom: &'a mut [Point<C>; 4]

The four phantom points, which hinting may move.

§is_composite: bool

True when hinting a composite rather than a simple glyph.

§coords: &'a [F2Dot14]

Normalized variation coordinates, empty for a static instance.

Auto Trait Implementations§

§

impl<'a, C> !UnwindSafe for GlyphZone<'a, C>

§

impl<'a, C> Freeze for GlyphZone<'a, C>

§

impl<'a, C> RefUnwindSafe for GlyphZone<'a, C>
where C: RefUnwindSafe,

§

impl<'a, C> Send for GlyphZone<'a, C>
where C: Send,

§

impl<'a, C> Sync for GlyphZone<'a, C>
where C: Sync,

§

impl<'a, C> Unpin for GlyphZone<'a, C>

§

impl<'a, C> UnsafeUnpin for GlyphZone<'a, C>

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.