read_fonts::tables::layout

Type Alias Feature

Source
pub type Feature<'a> = TableRef<'a, FeatureMarker>;
Expand description

Aliased Type§

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

Implementations§

Source§

impl<'a> Feature<'a>

Source

pub fn read(data: FontData<'a>, feature_tag: Tag) -> Result<Self, ReadError>

A constructor that requires additional arguments.

This type requires some external state in order to be parsed.

Source§

impl<'a> Feature<'a>

Source

pub fn feature_params_offset(&self) -> Nullable<Offset16>

Offset from start of Feature table to FeatureParams table, if defined for the feature and present, else NULL

Source

pub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>

Attempt to resolve feature_params_offset.

Source

pub fn lookup_index_count(&self) -> u16

Number of LookupList indices for this feature

Source

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

Array of indices into the LookupList — zero-based (first lookup is LookupListIndex = 0)

Trait Implementations§

Source§

impl<'a> FontReadWithArgs<'a> for Feature<'a>

Source§

fn read_with_args(data: FontData<'a>, args: &Tag) -> Result<Self, ReadError>

read an item, using the provided args. Read more
Source§

impl ReadArgs for Feature<'_>