FontTableProvider

Trait FontTableProvider 

Source
pub trait FontTableProvider {
    // Required methods
    fn table_data(&self, tag: u32) -> Result<Option<Cow<'_, [u8]>>, ParseError>;
    fn has_table(&self, tag: u32) -> bool;
    fn table_tags(&self) -> Option<Vec<u32>>;

    // Provided method
    fn read_table_data(&self, tag: u32) -> Result<Cow<'_, [u8]>, ParseError> { ... }
}

Required Methods§

Source

fn table_data(&self, tag: u32) -> Result<Option<Cow<'_, [u8]>>, ParseError>

Return data for the specified table if present

Source

fn has_table(&self, tag: u32) -> bool

Source

fn table_tags(&self) -> Option<Vec<u32>>

The tags of the tables within this font.

Returns None if the tags cannot be determined.

Provided Methods§

Source

fn read_table_data(&self, tag: u32) -> Result<Cow<'_, [u8]>, ParseError>

Implementations on Foreign Types§

Source§

impl<T: FontTableProvider> FontTableProvider for Box<T>

Source§

fn table_data(&self, tag: u32) -> Result<Option<Cow<'_, [u8]>>, ParseError>

Source§

fn has_table(&self, tag: u32) -> bool

Source§

fn table_tags(&self) -> Option<Vec<u32>>

Implementors§