pub struct Gsub<'a> {
data: FontData<'a>,
}Expand description
Fields§
§data: FontData<'a>Implementations§
Source§impl Gsub<'_>
impl Gsub<'_>
Sourcepub fn closure_glyphs(
&self,
lookups: &IntSet<u16>,
glyphs: &mut IntSet<GlyphId>,
) -> Result<(), ReadError>
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
Sourcepub fn collect_lookups(
&self,
feature_indices: &IntSet<u16>,
) -> Result<IntSet<u16>, ReadError>
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§impl<'a> Gsub<'a>
impl<'a> Gsub<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.
Sourcepub fn shape(&self) -> &Self
👎Deprecated: just use the base type directly
pub fn shape(&self) -> &Self
Return a reference to the table’s ‘Shape’ struct.
This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
The major and minor version of the GSUB table, as a tuple (u16, u16)
Sourcepub fn script_list_offset(&self) -> Offset16
pub fn script_list_offset(&self) -> Offset16
Offset to ScriptList table, from beginning of GSUB table
Sourcepub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
Attempt to resolve script_list_offset.
Sourcepub fn feature_list_offset(&self) -> Offset16
pub fn feature_list_offset(&self) -> Offset16
Offset to FeatureList table, from beginning of GSUB table
Sourcepub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
Attempt to resolve feature_list_offset.
Sourcepub fn lookup_list_offset(&self) -> Offset16
pub fn lookup_list_offset(&self) -> Offset16
Offset to LookupList table, from beginning of GSUB table
Sourcepub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>
pub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>
Attempt to resolve lookup_list_offset.
Sourcepub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
Offset to FeatureVariations table, from beginning of the GSUB table (may be NULL)
Sourcepub fn feature_variations(
&self,
) -> Option<Result<FeatureVariations<'a>, ReadError>>
pub fn feature_variations( &self, ) -> Option<Result<FeatureVariations<'a>, ReadError>>
Attempt to resolve feature_variations_offset.