pub struct HintedFontOutlineFace<'a> { /* private fields */ }Expand description
Validated safe-Rust hinted face reusable across a bounded text run.
Implementations§
Source§impl<'a> HintedFontOutlineFace<'a>
impl<'a> HintedFontOutlineFace<'a>
Sourcepub fn new(
font_bytes: &'a [u8],
request: FontOutlineFaceRequest<'_>,
) -> Result<Self, FontOutlineError>
pub fn new( font_bytes: &'a [u8], request: FontOutlineFaceRequest<'_>, ) -> Result<Self, FontOutlineError>
Build a FreeType-normal-target compatible hinted face from caller bytes.
Sourcepub fn units_per_em(&self) -> u16
pub fn units_per_em(&self) -> u16
Return the face’s OpenType units per em.
Sourcepub fn glyph_hinting_memory_size(
&self,
glyph_id: u32,
) -> Result<usize, FontOutlineError>
pub fn glyph_hinting_memory_size( &self, glyph_id: u32, ) -> Result<usize, FontOutlineError>
Return the scratch-memory requirement for one embedded-hinted draw.
Sourcepub fn extract_glyph(
&self,
glyph_id: u32,
) -> Result<FontOutlineOutput, FontOutlineError>
pub fn extract_glyph( &self, glyph_id: u32, ) -> Result<FontOutlineOutput, FontOutlineError>
Extract one glyph. KiCad draws every outline command (#612).
Auto Trait Implementations§
impl<'a> Freeze for HintedFontOutlineFace<'a>
impl<'a> RefUnwindSafe for HintedFontOutlineFace<'a>
impl<'a> Send for HintedFontOutlineFace<'a>
impl<'a> Sync for HintedFontOutlineFace<'a>
impl<'a> Unpin for HintedFontOutlineFace<'a>
impl<'a> UnsafeUnpin for HintedFontOutlineFace<'a>
impl<'a> UnwindSafe for HintedFontOutlineFace<'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