Type Alias Subtable3

Source
pub type Subtable3<'a> = TableRef<'a, Subtable3Marker>;
Expand description

The type 3 ‘kern’ subtable.

Aliased Type§

pub struct Subtable3<'a> {
    pub(crate) shape: Subtable3Marker,
    pub(crate) data: FontData<'a>,
}

Fields§

§shape: Subtable3Marker§data: FontData<'a>

Implementations§

Source§

impl<'a> Subtable3<'a>

Source

pub fn glyph_count(&self) -> u16

The number of glyphs in this font.

Source

pub fn kern_value_count(&self) -> u8

The number of kerning values.

Source

pub fn left_class_count(&self) -> u8

The number of left-hand classes.

Source

pub fn right_class_count(&self) -> u8

The number of right-hand classes.

Source

pub fn flags(&self) -> u8

Set to zero (reserved for future use).

Source

pub fn kern_value(&self) -> &'a [BigEndian<i16>]

The kerning values.

Source

pub fn left_class(&self) -> &'a [u8]

The left-hand classes.

Source

pub fn right_class(&self) -> &'a [u8]

The right-hand classes.

Source

pub fn kern_index(&self) -> &'a [u8]

The indices into the kernValue array.

Source§

impl Subtable3<'_>

Source

pub fn kerning(&self, left: GlyphId, right: GlyphId) -> Option<i32>

Returns the kerning adjustment for the given pair.

Trait Implementations§

Source§

impl<'a> Debug for Subtable3<'a>

Source§

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

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

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