diff --git a/otl/gsub-ligation.ptl b/otl/gsub-ligation.ptl index da5104905..f05f6b2cf 100644 --- a/otl/gsub-ligation.ptl +++ b/otl/gsub-ligation.ptl @@ -525,18 +525,14 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook local stickTermLeft {} local stickConnLeft {} foreach [lc : items-of {'l' 'l1' 'j' 'j1' 'c' 'z'}] : begin - local freeCls : [CBar "\(lc)f"] barCls - foreach [g : items-of freeCls] : if glyphs.(g) : stickTermLeft.push g - local connCls : [CBar "\(lc)c"] barCls - foreach [g : items-of connCls] : if glyphs.(g) : stickConnLeft.push g + set stickTermLeft : stickTermLeft.concat : [CBar "\(lc)f"] barCls + set stickConnLeft : stickConnLeft.concat : [CBar "\(lc)c"] barCls local stickTermRight {} local stickConnRight {} foreach [rc : items-of {'r' 'r1' 'j' 'j1' 'c' 'z'}] : begin - local freeCls : [CBar "f\(rc)"] barCls - foreach [g : items-of freeCls] : if glyphs.(g) : stickTermRight.push g - local connCls : [CBar "c\(rc)"] barCls - foreach [g : items-of connCls] : if glyphs.(g) : stickConnRight.push g + set stickTermRight : stickTermRight.concat : [CBar "f\(rc)"] barCls + set stickConnRight : stickConnRight.concat : [CBar "c\(rc)"] barCls CreateLigationLookup : list chain-rule diff --git a/otl/table-util.ptl b/otl/table-util.ptl index 4d315c731..c0898a531 100644 --- a/otl/table-util.ptl +++ b/otl/table-util.ptl @@ -1,6 +1,7 @@ export : define [CreateEmptyTable] {.languages {.} .features {.} .lookups {.}} extern Map +extern Set export : define [pick-language sink tag] : begin if sink.languages.(tag) : return sink.languages.(tag) @@ -112,7 +113,7 @@ export : define [ChainRuleBuilder sink] : begin set founde true foreach [j : range 0 terms.length] : begin local term terms.(j) - subtable.match.push term.left + subtable.match.push : Array.from : new Set term.left local lutn : getSubLookup term.left term.right if lutn : subtable.apply.push {.at j .lookup lutn} return subtable