Type Alias Subtable

Source
pub type Subtable<'a> = TableRef<'a, SubtableMarker>;
Expand description

A subtable in a kerx table.

Aliased Type§

pub struct Subtable<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Subtable<'a>

Source

pub fn length(&self) -> u32

The length of this subtable in bytes, including this header.

Source

pub fn coverage(&self) -> u32

Circumstances under which this table is used.

Source

pub fn tuple_count(&self) -> u32

The tuple count. This value is only used with variation fonts and should be 0 for all other fonts. The subtable’s tupleCount will be ignored if the ‘kerx’ table version is less than 4.

Source

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

Subtable specific data.

Source§

impl<'a> Subtable<'a>

Source

pub const HEADER_LEN: usize = 12usize

Source

pub fn is_vertical(&self) -> bool

True if the table has vertical kerning values.

Source

pub fn is_horizontal(&self) -> bool

True if the table has horizontal kerning values.

Source

pub fn is_cross_stream(&self) -> bool

True if the table has cross-stream kerning values.

If text is normally written horizontally, adjustments will be vertical. If adjustment values are positive, the text will be moved up. If they are negative, the text will be moved down. If text is normally written vertically, adjustments will be horizontal. If adjustment values are positive, the text will be moved to the right. If they are negative, the text will be moved to the left.

Source

pub fn is_variable(&self) -> bool

True if the table has variation kerning values.

Source

pub fn process_direction(&self) -> bool

Process direction flag. If clear, process the glyphs forwards, that is, from first to last in the glyph stream. If we, process them from last to first. This flag only applies to state-table based ‘kerx’ subtables (types 1 and 4).

Source

pub fn kind(&self) -> Result<SubtableKind<'a>, ReadError>

Returns an enum representing the actual subtable data.

Trait Implementations§

Source§

impl<'a> FontRead<'a> for Subtable<'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 VarSize for Subtable<'_>

Source§

type Size = u32

The type of the first (length) field of the item. Read more