pub type PairPosFormat2<'a> = TableRef<'a, PairPosFormat2Marker>;
Expand description
Pair Adjustment Positioning Format 2: Class Pair Adjustment
Aliased Type§
pub struct PairPosFormat2<'a> {
pub(crate) shape: PairPosFormat2Marker,
pub(crate) data: FontData<'a>,
}
Fields§
§shape: PairPosFormat2Marker
§data: FontData<'a>
Implementations§
Source§impl<'a> PairPosFormat2<'a>
impl<'a> PairPosFormat2<'a>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 2
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of PairPos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn value_format1(&self) -> ValueFormat
pub fn value_format1(&self) -> ValueFormat
ValueRecord definition — for the first glyph of the pair (may be zero).
Sourcepub fn value_format2(&self) -> ValueFormat
pub fn value_format2(&self) -> ValueFormat
ValueRecord definition — for the second glyph of the pair (may be zero).
Sourcepub fn class_def1_offset(&self) -> Offset16
pub fn class_def1_offset(&self) -> Offset16
Offset to ClassDef table, from beginning of PairPos subtable — for the first glyph of the pair.
Sourcepub fn class_def1(&self) -> Result<ClassDef<'a>, ReadError>
pub fn class_def1(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve class_def1_offset
.
Sourcepub fn class_def2_offset(&self) -> Offset16
pub fn class_def2_offset(&self) -> Offset16
Offset to ClassDef table, from beginning of PairPos subtable — for the second glyph of the pair.
Sourcepub fn class_def2(&self) -> Result<ClassDef<'a>, ReadError>
pub fn class_def2(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve class_def2_offset
.
Sourcepub fn class1_count(&self) -> u16
pub fn class1_count(&self) -> u16
Number of classes in classDef1 table — includes Class 0.
Sourcepub fn class2_count(&self) -> u16
pub fn class2_count(&self) -> u16
Number of classes in classDef2 table — includes Class 0.
Sourcepub fn class1_records(&self) -> ComputedArray<'a, Class1Record<'a>>
pub fn class1_records(&self) -> ComputedArray<'a, Class1Record<'a>>
Array of Class1 records, ordered by classes in classDef1.
Source§impl PairPosFormat2<'_>
impl PairPosFormat2<'_>
Sourcepub fn values(
&self,
class1: u16,
class2: u16,
context: &ValueContext<'_>,
) -> Result<[Value; 2], ReadError>
pub fn values( &self, class1: u16, class2: u16, context: &ValueContext<'_>, ) -> Result<[Value; 2], ReadError>
Returns the pair of values for the given classes, optionally accounting for variations.
The class1
and class2
parameters can be computed by passing the
first and second glyphs of the pair to the ClassDef
s returned by
Self::class_def1
and Self::class_def2
respectively.