struct Pass<'a, 's, 'buf, 'hint, S: Scale> {Show 13 fields
context: &'a dyn OutlineContext<'a>,
scale: &'s S,
varies: bool,
coords: &'s [F2Dot14],
gvar_scalars: &'s [Fixed],
has_hvar: bool,
buffers: Buffers<'buf, S>,
point_count: usize,
contour_count: usize,
component_delta_count: usize,
phantom: [Point<S::Coord>; 4],
hinter: Option<&'hint mut dyn Hinter<S::Coord>>,
is_hinted: bool,
}Fields§
§context: &'a dyn OutlineContext<'a>§scale: &'s S§varies: bool§coords: &'s [F2Dot14]§gvar_scalars: &'s [Fixed]§has_hvar: bool§buffers: Buffers<'buf, S>§point_count: usize§contour_count: usize§component_delta_count: usize§phantom: [Point<S::Coord>; 4]§hinter: Option<&'hint mut dyn Hinter<S::Coord>>§is_hinted: boolImplementations§
Source§impl<'a, 's, 'buf, S: Scale> Pass<'a, 's, 'buf, '_, S>
impl<'a, 's, 'buf, S: Scale> Pass<'a, 's, 'buf, '_, S>
fn finish(self) -> OutlineRef<'buf, S::Coord>
fn load( &mut self, glyph: &Option<Glyph<'a>>, gid: GlyphId, recurse_depth: usize, ) -> Result<(), Error>
Sourcefn setup_phantom_points(&mut self, glyph: &Option<Glyph<'a>>, gid: GlyphId)
fn setup_phantom_points(&mut self, glyph: &Option<Glyph<'a>>, gid: GlyphId)
Sets up the four points appended to every outline that carry its metrics.
See https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructing_glyphs#phantom-points and https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/truetype/ttgload.c#L1365
fn load_empty(&mut self, gid: GlyphId) -> Result<(), Error>
Sourcefn read_contours(
&mut self,
glyph: &SimpleGlyph<'a>,
) -> Result<Range<usize>, Error>
fn read_contours( &mut self, glyph: &SimpleGlyph<'a>, ) -> Result<Range<usize>, Error>
Copies a glyph’s contour end points into the buffer, checking that they ascend, and returns the range they occupy.
They stay relative to the glyph until its points have been loaded; see
the end of Self::load_simple.
fn load_simple( &mut self, glyph: &SimpleGlyph<'a>, gid: GlyphId, ) -> Result<(), Error>
Sourcefn hint_glyph(
&mut self,
bytecode: &'a [u8],
points_start: usize,
contours_range: Range<usize>,
phantom_offset: usize,
gid: GlyphId,
is_composite: bool,
) -> Result<(), Error>
fn hint_glyph( &mut self, bytecode: &'a [u8], points_start: usize, contours_range: Range<usize>, phantom_offset: usize, gid: GlyphId, is_composite: bool, ) -> Result<(), Error>
Runs the hinter over the points just written, if there are instructions and hinting is active.
points_start is where this glyph’s points begin in the outline, and
phantom_offset is where its phantom points begin within them.
fn load_composite( &mut self, glyph: &CompositeGlyph<'a>, gid: GlyphId, recurse_depth: usize, ) -> Result<(), Error>
Auto Trait Implementations§
impl<'a, 's, 'buf, 'hint, S> !RefUnwindSafe for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> !Send for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> !Sync for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> !UnwindSafe for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> Freeze for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> Unpin for Pass<'a, 's, 'buf, 'hint, S>
impl<'a, 's, 'buf, 'hint, S> UnsafeUnpin for Pass<'a, 's, 'buf, 'hint, S>
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