Type Alias Feature

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

Aliased Type§

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

Fields§

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

Implementations§

Source§

impl Feature<'_>

Source

pub(crate) fn collect_lookups(&self) -> Vec<u16>

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)

Source

pub(crate) fn feature_tag(&self) -> Tag

Trait Implementations§

Source§

impl<'a> Debug for Feature<'a>

Source§

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

Formats the value using the given formatter. Read more
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<'_>

Source§

impl<'a> SomeTable<'a> for Feature<'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.