pub struct FontSubset { /* private fields */ }Expand description
FontSubset allows creating a subset of a font with only specified glyphs
Implementations§
Source§impl FontSubset
impl FontSubset
Sourcepub fn with_glyphs(&mut self, glyph_ids: &[u32]) -> &mut Self
pub fn with_glyphs(&mut self, glyph_ids: &[u32]) -> &mut Self
Add glyphs to keep in the subset
Sourcepub fn with_chars(&mut self, chars: &[char]) -> Result<&mut Self>
pub fn with_chars(&mut self, chars: &[char]) -> Result<&mut Self>
Add characters to keep (will be mapped to their glyphs)
Sourcepub fn retain_tables(&mut self, tables: &[[u8; 4]]) -> &mut Self
pub fn retain_tables(&mut self, tables: &[[u8; 4]]) -> &mut Self
Retain specific tables (all tables are retained by default)
Auto Trait Implementations§
impl Freeze for FontSubset
impl RefUnwindSafe for FontSubset
impl Send for FontSubset
impl Sync for FontSubset
impl Unpin for FontSubset
impl UnwindSafe for FontSubset
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