pub struct Outlines<'a> {Show 19 fields
pub(crate) font: FontRef<'a>,
pub(crate) glyph_metrics: GlyphHMetrics<'a>,
loca: Loca<'a>,
glyf: Glyf<'a>,
gvar: Option<Gvar<'a>>,
hdmx: Option<Hdmx<'a>>,
fpgm: &'a [u8],
prep: &'a [u8],
cvt_len: u32,
max_function_defs: u16,
max_instruction_defs: u16,
max_twilight_points: u16,
max_stack_elements: u16,
max_storage: u16,
glyph_count: u16,
units_per_em: u16,
os2_vmetrics: [i16; 2],
prefer_interpreter: bool,
pub(crate) fractional_size_hinting: bool,
}Expand description
Scaler state for TrueType outlines.
Fields§
§font: FontRef<'a>§glyph_metrics: GlyphHMetrics<'a>§loca: Loca<'a>§glyf: Glyf<'a>§gvar: Option<Gvar<'a>>§hdmx: Option<Hdmx<'a>>§fpgm: &'a [u8]§prep: &'a [u8]§cvt_len: u32§max_function_defs: u16§max_instruction_defs: u16§max_twilight_points: u16§max_stack_elements: u16§max_storage: u16§glyph_count: u16§units_per_em: u16§os2_vmetrics: [i16; 2]§prefer_interpreter: bool§fractional_size_hinting: boolImplementations§
Source§impl<'a> Outlines<'a>
impl<'a> Outlines<'a>
pub fn new(font: &FontRef<'a>) -> Option<Self>
pub fn units_per_em(&self) -> u16
pub fn glyph_count(&self) -> usize
pub fn prefer_interpreter(&self) -> bool
pub fn outline(&self, glyph_id: GlyphId) -> Result<Outline<'a>, DrawError>
pub fn compute_scale(&self, ppem: Option<f32>) -> (bool, F26Dot6)
pub fn compute_hinted_scale(&self, ppem: Option<f32>) -> (bool, F26Dot6)
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Outlines<'a>
impl<'a> RefUnwindSafe for Outlines<'a>
impl<'a> Send for Outlines<'a>
impl<'a> Sync for Outlines<'a>
impl<'a> Unpin for Outlines<'a>
impl<'a> UnwindSafe for Outlines<'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