Type Alias Gsub

Source
pub type Gsub<'a> = TableRef<'a, GsubMarker>;
Expand description

Aliased Type§

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

Fields§

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

Implementations§

Source§

impl Gsub<'_>

Source

pub fn closure_glyphs( &self, lookups: &IntSet<u16>, glyphs: &mut IntSet<GlyphId>, ) -> Result<(), ReadError>

Return the set of glyphs reachable from the input set via any substitution. ref: https://github.com/harfbuzz/harfbuzz/blob/8d517f7e43f648cb804c46c47ae8009330fe4a47/src/hb-ot-layout.cc#L1616

Source

pub fn collect_lookups( &self, feature_indices: &IntSet<u16>, ) -> Result<IntSet<u16>, ReadError>

Return a set of lookups referenced by the specified features

Pass &IntSet::all() to get the lookups referenced by all features.

Source

pub fn collect_features( &self, scripts: &IntSet<Tag>, languages: &IntSet<Tag>, features: &IntSet<Tag>, ) -> Result<IntSet<u16>, ReadError>

Return a set of all feature indices underneath the specified scripts, languages and features

Source

pub fn closure_lookups( &self, glyphs: &IntSet<GlyphId>, lookup_indices: &mut IntSet<u16>, ) -> Result<(), ReadError>

Update the set of lookup indices with all lookups reachable from specified glyph set and lookup_indices.

Source§

impl<'a> Gsub<'a>

Source

pub fn version(&self) -> MajorMinor

The major and minor version of the GSUB table, as a tuple (u16, u16)

Source

pub fn script_list_offset(&self) -> Offset16

Offset to ScriptList table, from beginning of GSUB table

Source

pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>

Attempt to resolve script_list_offset.

Source

pub fn feature_list_offset(&self) -> Offset16

Offset to FeatureList table, from beginning of GSUB table

Source

pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>

Attempt to resolve feature_list_offset.

Source

pub fn lookup_list_offset(&self) -> Offset16

Offset to LookupList table, from beginning of GSUB table

Source

pub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>

Attempt to resolve lookup_list_offset.

Source

pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>

Offset to FeatureVariations table, from beginning of the GSUB table (may be NULL)

Source

pub fn feature_variations( &self, ) -> Option<Result<FeatureVariations<'a>, ReadError>>

Attempt to resolve feature_variations_offset.

Trait Implementations§

Source§

impl<'a> Debug for Gsub<'a>

Source§

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

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

impl<'a> FontRead<'a> for Gsub<'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 Gsub<'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.
Source§

impl TopLevelTable for Gsub<'_>

Source§

const TAG: Tag

GSUB