read_fonts::tables::layout

Type Alias 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> 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