diff --git a/font-src/otl/gsub-ligation.ptl b/font-src/otl/gsub-ligation.ptl index 846cb91de..f43cb94d6 100644 --- a/font-src/otl/gsub-ligation.ptl +++ b/font-src/otl/gsub-ligation.ptl @@ -43,8 +43,12 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] : define underscore {'underscore'} define regexLookAround [less.concat hyphen equal exclam greater anyBar] - define [acops] {'less' 'greater' 'hyphen' 'equal' 'plus'} - define [acskip] {'slash' 'bar' 'at' 'ampersand' 'percent' 'numberSign'} + define [acops] : if [hasLG 'bar-triggers-op-centering'] + begin {'less' 'greater' 'hyphen' 'equal' 'plus' 'slash' 'bar' 'backslash'} + begin {'less' 'greater' 'hyphen' 'equal' 'plus'} + define [acskip] : if [hasLG 'bar-triggers-op-centering'] + begin {'at' 'ampersand' 'percent' 'numberSign'} + begin {'slash' 'bar' 'backslash' 'at' 'ampersand' 'percent' 'numberSign'} local ligationLookupName : 'lig_' + featureName + '{' + mappedFeature + '}' diff --git a/params/ligation-set.toml b/params/ligation-set.toml index c0287d330..3d1ef4d05 100644 --- a/params/ligation-set.toml +++ b/params/ligation-set.toml @@ -147,6 +147,11 @@ ligGroup = "dot-oper" samples = ["<.", "<.>", ".>"] desc = 'Treat dot (`.`) as operator and perform chained centering' +[simple.bar-triggers-op-centering] +ligGroup = "bar-triggers-op-centering" +samples = [":|", ":|:", "|:"] +desc = 'Bars (`/`, `|`, `\`) will trigger operator centering' + [simple.lteq-as-arrow] ligGroup = "arrowZALE" samples = ["<="] @@ -277,6 +282,11 @@ tag = 'SWFT' buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'exeq', 'ineq', 'ltgt-diamond', 'plusplus', 'kern-dotty', 'kern-bars'] desc = 'Swift' +[composite.dafny] +tag = 'DFNY' +buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'exeq', 'ineq', 'ltgt-diamond', 'plusplus', 'bar-triggers-op-centering', 'kern-dotty', 'kern-bars'] +desc = 'Dafny' + [composite.coq] tag = 'COQX' buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ltgt-ne', 'ineq', 'plusplus', 'dot-as-operator', 'logic', 'brst', 'kern-dotty', 'kern-bars']