Type Alias read_fonts::tables::layout::ClassDefFormat2

source ·
pub type ClassDefFormat2<'a> = TableRef<'a, ClassDefFormat2Marker>;
Expand description

Aliased Type§

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

Implementations§

source§

impl<'a> ClassDefFormat2<'a>

source

pub fn class_format(&self) -> u16

Format identifier — format = 2

source

pub fn class_range_count(&self) -> u16

Number of ClassRangeRecords

source

pub fn class_range_records(&self) -> &'a [ClassRangeRecord]

Array of ClassRangeRecords — ordered by startGlyphID

source§

impl<'a> ClassDefFormat2<'a>

source

pub fn get(&self, gid: GlyphId16) -> u16

Get the class for this glyph id

source

pub fn iter(&self) -> impl Iterator<Item = (GlyphId16, u16)> + 'a

Iterate over each glyph and its class.

Trait Implementations§

source§

impl<'a> Debug for ClassDefFormat2<'a>

source§

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

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

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