Type Alias read_fonts::tables::postscript::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> Debug for Index1<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

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

source§

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

Read an instace of Self from the provided data, performing validation. Read more
source§

impl<'a> SomeTable<'a> for Index1<'a>

source§

fn type_name(&self) -> &str

The name of this table
source§

fn get_field(&self, idx: usize) -> Option<Field<'a>>

Access this table’s fields, in declaration order.