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