Add fine-grainded arrow ligation control (#2776)
This commit is contained in:
parent
effc731862
commit
1af116c52e
7 changed files with 262 additions and 127 deletions
|
@ -1,72 +1,72 @@
|
|||
[simple.center-ops]
|
||||
samples = [":=", ":-", ":+", "<*", "<*>", "*>", "+:", "-:", "=:", "<***>", "<:", ":>", "*-", "-*", "*=", "=*", "*+", "+*"]
|
||||
desc = 'Vertically align some of the operators (like `*`) to the center position it is before or after a "center" operator (like `+`)'
|
||||
###################################################################################################
|
||||
# The following section defines the fine-grained ligation set for the ligature font.
|
||||
# The ligation builder code (font-otl/src/gsub-ligation.ptl) will be driven by these settings.
|
||||
|
||||
[simple.center-op-trigger-plus-minus-l]
|
||||
samples = ["*+", "*-", ":+", ":-", ".+", ".-"]
|
||||
desc = 'Plus (`+`) and Minus (`-`) will trigger other operator characters at left to be centered'
|
||||
### Arrows
|
||||
|
||||
[simple.center-op-trigger-plus-minus-r]
|
||||
samples = ["+*", "-*", "+:", "-:", "+.", "-."]
|
||||
desc = 'Plus (`+`) and Minus (`-`) will trigger other operator characters at right to be centered'
|
||||
[simple.arrow-l-hyphen]
|
||||
samples = ["<--", "<---", "<<-", "<-", "<-->", "<--->", "<---->", "<-<"]
|
||||
desc = 'Left-pointing arrows with hyphen-minus (`-`) being the rod'
|
||||
|
||||
[simple.center-op-trigger-equal-l]
|
||||
samples = ["*=", ":=", ".="]
|
||||
desc = 'Equal (`=`) will trigger other operator characters at left to be centered'
|
||||
[simple.arrow-r-hyphen]
|
||||
samples = ["->", "->>", "-->", "--->", "<-->", "<--->", "<---->", ">->"]
|
||||
desc = 'Right-pointing arrows with hyphen-minus (`-`) being the rod'
|
||||
|
||||
[simple.center-op-trigger-equal-r]
|
||||
samples = ["=*", "=:", "=."]
|
||||
desc = 'Equal (`=`) will trigger other operator characters at right to be centered'
|
||||
[simple.arrow-lr-hyphen]
|
||||
samples = ["<->"]
|
||||
desc = 'Dual-pointing arrows with hyphen-minus (`-`) being the rod'
|
||||
|
||||
[simple.center-op-trigger-bar-l]
|
||||
samples = ["*|", ":|"]
|
||||
desc = 'Bars (`|`) will trigger other operator characters at left to be centered'
|
||||
[simple.counter-arrow-l-hyphen]
|
||||
samples = ["-<<", "-<", "-<-", "-<<", "-<", "-<-"]
|
||||
desc = 'Left-pointing counter-arrows with hyphen-minus (`-`) being the rod'
|
||||
|
||||
[simple.center-op-trigger-bar-r]
|
||||
samples = ["|*", "|:"]
|
||||
desc = 'Bars (`|`) will trigger other operator characters at right to be centered'
|
||||
|
||||
[simple.center-op-trigger-angle-inside]
|
||||
samples = ["<:", "<:>", ":>", "<*", "<*>", "*>", "<.", "<.>", ".>"]
|
||||
desc = 'Less (`<`) and Greater (`>`) will trigger other operator characters at inside to be centered'
|
||||
|
||||
[simple.center-op-trigger-angle-outside]
|
||||
samples = [">*", "*<"]
|
||||
desc = 'Less (`<`) and Greater (`>`) will trigger other operator characters at outside to be centered'
|
||||
|
||||
[simple.center-op-influence-dot]
|
||||
samples = ["<.", "<.>", ".>"]
|
||||
desc = 'Treat dot (`.`) as operator and perform chained centering'
|
||||
|
||||
[simple.center-op-influence-colon]
|
||||
samples = ["<:", "<:>", ":>", ":=", "=:", ":-", "-:"]
|
||||
desc = 'Treat colon (`:`) as operator and perform chained centering'
|
||||
[simple.counter-arrow-r-hyphen]
|
||||
samples = ["->-", ">-", ">>-", "->-", ">-", ">>-"]
|
||||
desc = 'Right-pointing counter-arrows with hyphen-minus (`-`) being the rod'
|
||||
|
||||
|
||||
[simple.arrow-l-equal]
|
||||
samples = ["<==", "<===", "<<=", "<=", "<==>", "<===>", "<====>", "<=<"]
|
||||
desc = 'Left-pointing arrows with equal sign (`=`) being the rod'
|
||||
|
||||
[simple.arrow-l]
|
||||
samples = ["<--", "<---", "<<-", "<-", "<-->", "<--->", "<---->", "<=", "<==", "<===", "<<=", "<==>", "<===>", "<====>", "<~~", "<~", "<=<", "<-<"]
|
||||
desc = 'Enable ligation set that forms left-pointing arrows'
|
||||
[simple.arrow-r-equal]
|
||||
samples = ["=>", "=>>", "==>", "===>", "<==>", "<===>", "<====>", ">=>"]
|
||||
desc = 'Right-pointing arrows with equal sign (`=`) being the rod'
|
||||
|
||||
[simple.arrow-r]
|
||||
samples = ["->", "->>", "-->", "--->", "<-->", "<--->", "<---->", "=>", "=>>", "==>", "===>", "<==>", "<===>", "<====>", "~>", "~~>", "-------->", ">=>", ">->"]
|
||||
desc = 'Enable ligation set that forms right-pointing arrows'
|
||||
[simple.arrow-lr-equal]
|
||||
samples = ["<=>"]
|
||||
desc = 'Dual-pointing arrows with equal sign (`=`) being the rod'
|
||||
|
||||
[simple.arrow-lr]
|
||||
samples = ["<->", "<=>", "<~>"]
|
||||
desc = 'Enable ligation set that forms dual-pointing arrows'
|
||||
[simple.counter-arrow-l-equal]
|
||||
samples = ["=<<", "=<", "=<=", "=<<", "=<", "=<="]
|
||||
desc = 'Left-pointing counter-arrows with equal sign (`=`) being the rod'
|
||||
|
||||
[simple.counter-arrow-l]
|
||||
samples = ["-<<", "-<", "-<-", "=<<", "=<", "=<=", "<=<", "-<<", "-<", "-<-", "=<<", "=<", "=<="]
|
||||
desc = 'Enable ligation that produces left-pointing counter-arrows'
|
||||
[simple.counter-arrow-r-equal]
|
||||
samples = ["=>=", ">=", ">>=", "=>=", ">=", ">>="]
|
||||
desc = 'Right-pointing counter-arrows with equal sign (`=`) being the rod'
|
||||
|
||||
[simple.counter-arrow-r]
|
||||
samples = ["->-", ">-", ">>-", "=>=", ">=>", "->-", ">-", ">>-", ">>=", "=>="]
|
||||
desc = 'Enable ligation that produces right-pointing counter-arrows'
|
||||
|
||||
[simple.trig]
|
||||
samples = ["<|", "<|>", "|>"]
|
||||
desc = 'Enable ligation for `<|`, `|>` , `<||`, and other bar-and-angle-bracket symbols'
|
||||
[simple.arrow-l-wave]
|
||||
samples = ["<~~", "<~~~", "<<~", "<~", "<~~>", "<~~~>", "<~~~~>", "<~<"]
|
||||
desc = 'Left-pointing arrows with tilde (`~`) being the rod'
|
||||
|
||||
[simple.arrow-r-wave]
|
||||
samples = ["~>", "~>>", "~~>", "~~~>", "<~~>", "<~~~>", "<~~~~>", ">~>"]
|
||||
desc = 'Right-pointing arrows with tilde (`~`) being the rod'
|
||||
|
||||
[simple.arrow-lr-wave]
|
||||
samples = ["<~>"]
|
||||
desc = 'Dual-pointing arrows with tilde (`~`) being the rod'
|
||||
|
||||
[simple.counter-arrow-l-wave]
|
||||
samples = ["~<<", "~<", "~<~", "~<<", "~<", "~<~"]
|
||||
desc = 'Left-pointing counter-arrows with tilde (`~`) being the rod'
|
||||
|
||||
[simple.counter-arrow-r-wave]
|
||||
samples = ["~>~", ">~", ">>~", "~>~", ">~", ">>~"]
|
||||
desc = 'Right-pointing counter-arrows with tilde (`~`) being the rod'
|
||||
|
||||
### Equality and Inequality
|
||||
|
||||
[simple.eqeqeq]
|
||||
samples = ["==="]
|
||||
|
@ -142,6 +142,12 @@ desc = 'Enable special triple-line ligation for `=/=` as inequality'
|
|||
samples = ["/=", "=/="]
|
||||
desc = 'Enable ligation for `/=` and `=/=` as inequality'
|
||||
|
||||
### Triangles and Diamonds
|
||||
|
||||
[simple.trig]
|
||||
samples = ["<|", "<|>", "|>"]
|
||||
desc = 'Enable ligation for `<|`, `|>` , `<||`, and other bar-and-angle-bracket symbols'
|
||||
|
||||
[simple.ltgt-ne]
|
||||
samples = ["<>"]
|
||||
sampleRank = 2
|
||||
|
@ -161,6 +167,8 @@ samples = ["</", "/>", "</>"]
|
|||
sampleRank = 2
|
||||
desc = 'Enable ligation for `</`, `/>` and `</>`'
|
||||
|
||||
### Comment symbols
|
||||
|
||||
[simple.brst]
|
||||
samples = ["(*", "*)", "(* comm *)"]
|
||||
desc = 'Center asterisk in `(*` and `*)`'
|
||||
|
@ -169,6 +177,8 @@ desc = 'Center asterisk in `(*` and `*)`'
|
|||
samples = ["/*", "*/", "/* comm */"]
|
||||
desc = 'Shift asterisk in `/*` and `*/`'
|
||||
|
||||
### Distance arrangement
|
||||
|
||||
[simple.kern-dotty]
|
||||
samples = ["::", ":::"]
|
||||
desc = 'Move connecting dotty punctuations closer, like for `::`, `:::` and `...`'
|
||||
|
@ -177,37 +187,54 @@ desc = 'Move connecting dotty punctuations closer, like for `::`, `:::` and `...
|
|||
samples = ["||", "|||"]
|
||||
desc = 'Move consecutive bars closer, like for `||`, `|||` and `//`'
|
||||
|
||||
[simple.logic]
|
||||
samples = ["/\\", "\\/", "|-", "-|"]
|
||||
desc = 'Enable ligation for `/\` and `\/`'
|
||||
### Operator Centering
|
||||
|
||||
[simple.llgg]
|
||||
samples = ["<<", ">>", "<<<", ">>>"]
|
||||
desc = 'Enable ligation for `<<`, `>>` and other angle-bracket chaining'
|
||||
[simple.center-ops]
|
||||
samples = [":=", ":-", ":+", "<*", "<*>", "*>", "+:", "-:", "=:", "<***>", "<:", ":>", "*-", "-*", "*=", "=*", "*+", "+*"]
|
||||
desc = 'Vertically align some of the operators (like `*`) to the center position it is before or after a "center" operator (like `+`)'
|
||||
|
||||
[simple.llggeq]
|
||||
samples = ["<<=", ">>="]
|
||||
sampleRank = 2
|
||||
desc = 'Enable ligation for `<<=`, `>>=` as shift operator'
|
||||
[simple.center-op-trigger-plus-minus-l]
|
||||
samples = ["*+", "*-", ":+", ":-", ".+", ".-"]
|
||||
desc = 'Plus (`+`) and Minus (`-`) will trigger other operator characters at left to be centered'
|
||||
|
||||
[simple.html-comment]
|
||||
samples = ["<!--", "<!---"]
|
||||
desc = 'Enable ligation for `<!--` and `<!---`'
|
||||
[simple.center-op-trigger-plus-minus-r]
|
||||
samples = ["+*", "-*", "+:", "-:", "+.", "-."]
|
||||
desc = 'Plus (`+`) and Minus (`-`) will trigger other operator characters at right to be centered'
|
||||
|
||||
[simple.colon-greater-as-colon-arrow]
|
||||
samples = [":>"]
|
||||
sampleRank = 2
|
||||
desc = 'Transform `:>` into `:` and a narrow arrow'
|
||||
[simple.center-op-trigger-equal-l]
|
||||
samples = ["*=", ":=", ".="]
|
||||
desc = 'Equal (`=`) will trigger other operator characters at left to be centered'
|
||||
|
||||
[simple.brace-bar]
|
||||
samples = ["{|", "|}"]
|
||||
desc = 'Enable ligation for `{|` and `|}`'
|
||||
[simple.center-op-trigger-equal-r]
|
||||
samples = ["=*", "=:", "=."]
|
||||
desc = 'Equal (`=`) will trigger other operator characters at right to be centered'
|
||||
|
||||
[simple.brack-bar]
|
||||
samples = ["[|", "|]"]
|
||||
desc = 'Enable ligation for `[|` and `|]`'
|
||||
[simple.center-op-trigger-bar-l]
|
||||
samples = ["*|", ":|"]
|
||||
desc = 'Bars (`|`) will trigger other operator characters at left to be centered'
|
||||
|
||||
[simple.center-op-trigger-bar-r]
|
||||
samples = ["|*", "|:"]
|
||||
desc = 'Bars (`|`) will trigger other operator characters at right to be centered'
|
||||
|
||||
[simple.center-op-trigger-angle-inside]
|
||||
samples = ["<:", "<:>", ":>", "<*", "<*>", "*>", "<.", "<.>", ".>"]
|
||||
desc = 'Less (`<`) and Greater (`>`) will trigger other operator characters at inside to be centered'
|
||||
|
||||
[simple.center-op-trigger-angle-outside]
|
||||
samples = [">*", "*<"]
|
||||
desc = 'Less (`<`) and Greater (`>`) will trigger other operator characters at outside to be centered'
|
||||
|
||||
[simple.center-op-influence-dot]
|
||||
samples = ["<.", "<.>", ".>"]
|
||||
desc = 'Treat dot (`.`) as operator and perform chained centering'
|
||||
|
||||
[simple.center-op-influence-colon]
|
||||
samples = ["<:", "<:>", ":>", ":=", "=:", ":-", "-:"]
|
||||
desc = 'Treat colon (`:`) as operator and perform chained centering'
|
||||
|
||||
### Connection
|
||||
|
||||
# Connection
|
||||
[simple.tilde-tilde]
|
||||
samples = ["~~"]
|
||||
implies = ["tilde-tilde-tilde"]
|
||||
|
@ -253,7 +280,42 @@ desc = 'Make 2 or more contiguous hash signs (number signs) (like `##`, `###` an
|
|||
samples = ["###", "####"]
|
||||
desc = 'Make 3 or more contiguous hash signs (number signs) (like `##` and `###`) connected'
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
[simple.logic]
|
||||
samples = ["/\\", "\\/", "|-", "-|"]
|
||||
desc = 'Enable ligation for `/\` and `\/`'
|
||||
|
||||
[simple.llgg]
|
||||
samples = ["<<", ">>", "<<<", ">>>"]
|
||||
desc = 'Enable ligation for `<<`, `>>` and other angle-bracket chaining'
|
||||
|
||||
[simple.llggeq]
|
||||
samples = ["<<=", ">>="]
|
||||
sampleRank = 2
|
||||
desc = 'Enable ligation for `<<=`, `>>=` as shift operator'
|
||||
|
||||
[simple.html-comment]
|
||||
samples = ["<!--", "<!---"]
|
||||
desc = 'Enable ligation for `<!--` and `<!---`'
|
||||
|
||||
[simple.colon-greater-as-colon-arrow]
|
||||
samples = [":>"]
|
||||
sampleRank = 2
|
||||
desc = 'Transform `:>` into `:` and a narrow arrow'
|
||||
|
||||
[simple.brace-bar]
|
||||
samples = ["{|", "|}"]
|
||||
desc = 'Enable ligation for `{|` and `|}`'
|
||||
|
||||
[simple.brack-bar]
|
||||
samples = ["[|", "|]"]
|
||||
desc = 'Enable ligation for `[|` and `|]`'
|
||||
|
||||
###################################################################################################
|
||||
# The following section defines composites of ligation sets.
|
||||
# The buildup property defines its formation, and we allow composites to be recursive.
|
||||
# When the tag property is not defined, the composite will be exposed in the final font file.
|
||||
|
||||
# Non-tagged composites, used for inheritance
|
||||
[composite.--default-center-ops--]
|
||||
|
@ -316,6 +378,52 @@ buildup = [ 'plus-plus', 'minus-minus', 'underscore-underscore', 'hash-hash', 't
|
|||
[composite.--c-like-chaining--]
|
||||
buildup = [ 'plus-plus', 'minus-minus-minus', 'underscore-underscore', 'hash-hash-hash', 'tilde-tilde-tilde' ]
|
||||
|
||||
[composite.arrow-l]
|
||||
showAsCherryPicking = true
|
||||
desc = "Left-pointing arrows"
|
||||
buildup = ['arrow-l-hyphen', 'arrow-l-equal', 'arrow-l-wave']
|
||||
[composite.arrow-r]
|
||||
showAsCherryPicking = true
|
||||
desc = "Right-pointing arrows"
|
||||
buildup = ['arrow-r-hyphen', 'arrow-r-equal', 'arrow-r-wave']
|
||||
[composite.arrow-lr]
|
||||
showAsCherryPicking = true
|
||||
desc = "Dual-pointing arrows"
|
||||
buildup = ['arrow-lr-hyphen', 'arrow-lr-equal', 'arrow-lr-wave']
|
||||
[composite.counter-arrow-l]
|
||||
showAsCherryPicking = true
|
||||
desc = "Left-pointing counter-arrows"
|
||||
buildup = ['counter-arrow-l-hyphen', 'counter-arrow-l-equal', 'counter-arrow-l-wave']
|
||||
[composite.counter-arrow-r]
|
||||
showAsCherryPicking = true
|
||||
desc = "Right-pointing counter-arrows"
|
||||
buildup = ['counter-arrow-r-hyphen', 'counter-arrow-r-equal', 'counter-arrow-r-wave']
|
||||
|
||||
[composite.arrow-hyphen]
|
||||
showAsCherryPicking = true
|
||||
desc = "Arrows using hyphen-minus (`-`) as the rod"
|
||||
buildup = ['arrow-l-hyphen', 'arrow-r-hyphen', 'arrow-lr-hyphen']
|
||||
[composite.arrow-equal]
|
||||
showAsCherryPicking = true
|
||||
desc = "Arrows using equal sign (`=`) as the rod"
|
||||
buildup = ['arrow-l-equal', 'arrow-r-equal', 'arrow-lr-equal']
|
||||
[composite.arrow-wave]
|
||||
showAsCherryPicking = true
|
||||
desc = "Arrows using tilde (`~`) as the rod"
|
||||
buildup = ['arrow-l-wave', 'arrow-r-wave', 'arrow-lr-wave']
|
||||
[composite.counter-arrow-hyphen]
|
||||
showAsCherryPicking = true
|
||||
desc = "Counter-arrows using hyphen-minus (`-`) as the rod"
|
||||
buildup = ['counter-arrow-l-hyphen', 'counter-arrow-r-hyphen']
|
||||
[composite.counter-arrow-equal]
|
||||
showAsCherryPicking = true
|
||||
desc = "Counter-arrows using equal sign (`=`) as the rod"
|
||||
buildup = ['counter-arrow-l-equal', 'counter-arrow-r-equal']
|
||||
[composite.counter-arrow-wave]
|
||||
showAsCherryPicking = true
|
||||
desc = "Counter-arrows using tilde (`~`) as the rod"
|
||||
buildup = ['counter-arrow-l-wave', 'counter-arrow-r-wave']
|
||||
|
||||
# This feature is on by default by many software
|
||||
[composite.default-calt]
|
||||
tag = 'calt'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue