mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Gardening. (#1789)
This commit is contained in:
parent
8e200c356c
commit
f197a447a4
@ -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))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user