read_fonts::tables::postscript

Type Alias Index1

Source
pub type Index1<'a> = TableRef<'a, Index1Marker>;
Expand description

An array of variable-sized objects in a CFF table.

Aliased Type§

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

Implementations§

Source§

impl<'a> Index1<'a>

Source

pub fn size_in_bytes(&self) -> Result<usize, ReadError>

Returns the total size in bytes of the index table.

Source

pub fn get_offset(&self, index: usize) -> Result<usize, Error>

Returns the offset of the object at the given index.

Source

pub fn get(&self, index: usize) -> Result<&'a [u8], Error>

Returns the data for the object at the given index.

Source§

impl<'a> Index1<'a>

Source

pub fn count(&self) -> u16

Number of objects stored in INDEX.

Source

pub fn off_size(&self) -> u8

Object array element size.

Source

pub fn offsets(&self) -> &'a [u8]

Bytes containing count + 1 offsets each of off_size.

Source

pub fn data(&self) -> &'a [u8]

Array containing the object data.

Trait Implementations§

Source§

impl<'a> FontRead<'a> for Index1<'a>

Source§

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

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