pub struct TtCollection {
pub fonts: Vec<Font>,
pub legacy_fonts: Option<Vec<Font>>,
pub dsig: Option<Option<Vec<u8>>>,
}Expand description
A TrueType or OpenType collection (TTCollection).
Fields§
§fonts: Vec<Font>The fonts (fonts). For version 1.1 and 2.1 collections, the preferred,
extended list.
legacy_fonts: Option<Vec<Font>>For version 1.1 and 2.1 collections, the compatibility list
(legacyFonts). fontoxide does not derive it.
dsig: Option<Option<Vec<u8>>>The collection’s digital signature (dsig). Some(None) writes a version
2 header without a signature; None writes version 1.
Implementations§
Source§impl TtCollection
impl TtCollection
Sourcepub fn read(data: impl Into<Arc<[u8]>>, options: ReadOptions) -> Result<Self>
pub fn read(data: impl Into<Arc<[u8]>>, options: ReadOptions) -> Result<Self>
Reads every font of a collection (TTCollection(file)). The font number in
options is ignored.
Sourcepub fn write(&mut self, share_tables: bool) -> Result<Vec<u8>>
pub fn write(&mut self, share_tables: bool) -> Result<Vec<u8>>
Compiles the collection (save). With share_tables, identical tables are
stored once.
Sourcepub fn to_ttx(&mut self, options: &TtxOptions) -> Result<String>
pub fn to_ttx(&mut self, options: &TtxOptions) -> Result<String>
Dumps the collection as TTX (saveXML). options.tables and the other
options apply to every font; write_version controls the
ttCollection element.
Trait Implementations§
Source§impl Clone for TtCollection
impl Clone for TtCollection
Source§impl Debug for TtCollection
impl Debug for TtCollection
Auto Trait Implementations§
impl !RefUnwindSafe for TtCollection
impl !UnwindSafe for TtCollection
impl Forget for TtCollection
impl Freeze for TtCollection
impl Move for TtCollection
impl Send for TtCollection
impl Sync for TtCollection
impl Unpin for TtCollection
impl UnsafeUnpin for TtCollectionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Font>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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