read_fonts::tables::aat

Type Alias Lookup2

source
pub type Lookup2<'a> = TableRef<'a, Lookup2Marker>;
Expand description

Segment single format. Each non-overlapping segment has a single lookup value that applies to all glyphs in the segment. A segment is defined as a contiguous range of glyph indexes.

Aliased Type§

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

Implementations§

source§

impl<'a> Lookup2<'a>

source

pub fn format(&self) -> u16

Format number is set to 2.

source

pub fn unit_size(&self) -> u16

Size of a lookup unit for this search in bytes.

source

pub fn n_units(&self) -> u16

Number of units of the preceding size to be searched.

source

pub fn search_range(&self) -> u16

The value of unitSize times the largest power of 2 that is less than or equal to the value of nUnits.

source

pub fn entry_selector(&self) -> u16

The log base 2 of the largest power of 2 less than or equal to the value of nUnits.

source

pub fn range_shift(&self) -> u16

The value of unitSize times the difference of the value of nUnits minus the largest power of 2 less than or equal to the value of nUnits.

source

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

Segments.

source§

impl<'a> Lookup2<'a>

source

pub fn value<T: LookupValue>(&self, index: u16) -> Result<T, ReadError>

Trait Implementations§

source§

impl<'a> Debug for Lookup2<'a>

source§

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

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

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