read_fonts::tables::postscript

Type Alias Index2

source
pub type Index2<'a> = TableRef<'a, Index2Marker>;
Expand description

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

Aliased Type§

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

Implementations§

source§

impl<'a> Index2<'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> Index2<'a>

source

pub fn count(&self) -> u32

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 Index2<'a>

source§

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

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

impl<'a> FontRead<'a> for Index2<'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> SomeTable<'a> for Index2<'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.