read_fonts

Type Alias TTCHeader

Source
pub type TTCHeader<'a> = TableRef<'a, TTCHeaderMarker>;
Expand description

Aliased Type§

struct TTCHeader<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> TTCHeader<'a>

Source

pub fn ttc_tag(&self) -> Tag

Font Collection ID string: "ttcf"

Source

pub fn version(&self) -> MajorMinor

Major/minor version of the TTC Header

Source

pub fn num_fonts(&self) -> u32

Number of fonts in TTC

Source

pub fn table_directory_offsets(&self) -> &'a [BigEndian<u32>]

Array of offsets to the TableDirectory for each font from the beginning of the file

Source

pub fn dsig_tag(&self) -> Option<u32>

Tag indicating that a DSIG table exists, 0x44534947 (‘DSIG’) (null if no signature)

Source

pub fn dsig_length(&self) -> Option<u32>

The length (in bytes) of the DSIG table (null if no signature)

Source

pub fn dsig_offset(&self) -> Option<u32>

The offset (in bytes) of the DSIG table from the beginning of the TTC file (null if no signature)

Source§

impl<'a, T> TableRef<'a, T>

Source

pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>

Resolve the provided offset from the start of this table.

Source

pub fn offset_data(&self) -> FontData<'a>

Return a reference to this table’s raw data.

We use this in the compile crate to resolve offsets.

Source

pub fn shape(&self) -> &T

Return a reference to the table’s ‘Shape’ struct.

This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.

Trait Implementations§

Source§

impl<'a> FontRead<'a> for TTCHeader<'a>

Source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of Self from the provided data, performing validation. Read more
Source§

impl<'a, T: Clone> Clone for TableRef<'a, T>

Source§

fn clone(&self) -> TableRef<'a, T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more