Gardening. (#1789)

This commit is contained in:
damaxwell 2023-07-25 08:26:45 -08:00 committed by GitHub
parent 8e200c356c
commit f197a447a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -470,13 +470,13 @@ pub enum GlyphwiseSubsts<'a> {
impl<'a> GlyphwiseSubsts<'a> { impl<'a> GlyphwiseSubsts<'a> {
pub fn new(gsub: LayoutTable<'a>, feature: Feature) -> Option<Self> { pub fn new(gsub: LayoutTable<'a>, feature: Feature) -> Option<Self> {
let ssty = gsub let table = gsub
.features .features
.find(feature.tag) .find(feature.tag)
.and_then(|feature| feature.lookup_indices.get(0)) .and_then(|feature| feature.lookup_indices.get(0))
.and_then(|index| gsub.lookups.get(index))?; .and_then(|index| gsub.lookups.get(index))?;
let ssty = ssty.subtables.get::<SubstitutionSubtable>(0)?; let table = table.subtables.get::<SubstitutionSubtable>(0)?;
match ssty { match table {
SubstitutionSubtable::Single(single_glyphs) => { SubstitutionSubtable::Single(single_glyphs) => {
Some(Self::Single(single_glyphs)) Some(Self::Single(single_glyphs))
} }