Type Alias read_fonts::tables::layout::ClassDefFormat1

source ·
pub type ClassDefFormat1<'a> = TableRef<'a, ClassDefFormat1Marker>;
Expand description

Aliased Type§

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

Implementations§

source§

impl<'a> ClassDefFormat1<'a>

source

pub fn class_format(&self) -> u16

Format identifier — format = 1

source

pub fn start_glyph_id(&self) -> GlyphId

First glyph ID of the classValueArray

source

pub fn glyph_count(&self) -> u16

Size of the classValueArray

source

pub fn class_value_array(&self) -> &'a [BigEndian<u16>]

Array of Class Values — one per glyph ID

source§

impl<'a> ClassDefFormat1<'a>

source

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

Get the class for this glyph id

source

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

Iterate over each glyph and its class.

Trait Implementations§

source§

impl<'a> Debug for ClassDefFormat1<'a>

source§

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

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

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