pub(crate) struct FreeTypeScaler<'a> {Show 13 fields
outlines: &'a Outlines<'a>,
memory: FreeTypeOutlineMemory<'a>,
coords: &'a [F2Dot14],
point_count: usize,
contour_count: usize,
component_delta_count: usize,
ppem: f32,
scale: F26Dot6,
is_scaled: bool,
is_hinted: bool,
pedantic_hinting: bool,
phantom: [Point<F26Dot6>; 4],
hinter: Option<&'a HintInstance>,
}Expand description
F26Dot6 coords, Fixed deltas, and a penchant for rounding
Fields§
§outlines: &'a Outlines<'a>§memory: FreeTypeOutlineMemory<'a>§coords: &'a [F2Dot14]§point_count: usize§contour_count: usize§component_delta_count: usize§ppem: f32§scale: F26Dot6§is_scaled: bool§is_hinted: bool§pedantic_hinting: bool§phantom: [Point<F26Dot6>; 4]Phantom points. These are 4 extra points appended to the end of an outline that allow the bytecode interpreter to produce hinted metrics.
See https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructing_glyphs#phantom-points
hinter: Option<&'a HintInstance>Implementations§
Source§impl<'a> FreeTypeScaler<'a>
impl<'a> FreeTypeScaler<'a>
pub(crate) fn unhinted( outlines: &'a Outlines<'a>, outline: &'a Outline<'_>, buf: &'a mut [u8], ppem: Option<f32>, coords: &'a [F2Dot14], ) -> Result<Self, DrawError>
pub(crate) fn hinted( outlines: &'a Outlines<'a>, outline: &'a Outline<'_>, buf: &'a mut [u8], ppem: Option<f32>, coords: &'a [F2Dot14], hinter: &'a HintInstance, pedantic_hinting: bool, ) -> Result<Self, DrawError>
pub(crate) fn scale( self, glyph: &Option<Glyph<'_>>, glyph_id: GlyphId, ) -> Result<ScaledOutline<'a, F26Dot6>, DrawError>
Trait Implementations§
Source§impl Scaler for FreeTypeScaler<'_>
impl Scaler for FreeTypeScaler<'_>
fn setup_phantom_points( &mut self, bounds: [i16; 4], lsb: i32, advance: i32, tsb: i32, vadvance: i32, )
fn outlines(&self) -> &Outlines<'_>
fn load_empty(&mut self, glyph_id: GlyphId) -> Result<(), DrawError>
fn load_simple( &mut self, glyph: &SimpleGlyph<'_>, glyph_id: GlyphId, ) -> Result<(), DrawError>
fn load_composite( &mut self, glyph: &CompositeGlyph<'_>, glyph_id: GlyphId, recurse_depth: usize, ) -> Result<(), DrawError>
fn load( &mut self, glyph: &Option<Glyph<'_>>, glyph_id: GlyphId, recurse_depth: usize, ) -> Result<(), DrawError>
Auto Trait Implementations§
impl<'a> Freeze for FreeTypeScaler<'a>
impl<'a> RefUnwindSafe for FreeTypeScaler<'a>
impl<'a> Send for FreeTypeScaler<'a>
impl<'a> Sync for FreeTypeScaler<'a>
impl<'a> Unpin for FreeTypeScaler<'a>
impl<'a> !UnwindSafe for FreeTypeScaler<'a>
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