pub struct Gpos<'a> {
data: FontData<'a>,
}Expand description
Fields§
§data: FontData<'a>Implementations§
Source§impl Gpos<'_>
impl Gpos<'_>
Sourcepub fn collect_features(
&self,
scripts: &IntSet<Tag>,
languages: &IntSet<Tag>,
features: &IntSet<Tag>,
) -> Result<IntSet<u16>, ReadError>
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§impl<'a> Gpos<'a>
impl<'a> Gpos<'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 GPOS 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 GPOS 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 GPOS 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 GPOS table
Sourcepub fn lookup_list(&self) -> Result<PositionLookupList<'a>, ReadError>
pub fn lookup_list(&self) -> Result<PositionLookupList<'a>, ReadError>
Attempt to resolve lookup_list_offset.
pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
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.