Add join suffix for NEQ ligatures (#1007)

This commit is contained in:
be5invis 2021-06-03 20:19:24 -07:00
parent b6563c4d6d
commit 436a18a1bf
3 changed files with 82 additions and 33 deletions

View file

@ -233,13 +233,14 @@ glyph-block Symbol-Ligation : begin
EqualHole Width EqualHole Width
create-glyph 'equal.fc+cc' : glyph-proc create-glyph 'equal.fc+cc' : glyph-proc
Joining.set currentGlyph Joining.Classes.Right Joining.set currentGlyph Joining.Classes.Mid
include : difference include : difference
EqualShape (SB - Width) (Width - joiningOverlap) EqualShape (SB - Width) (Width - joiningOverlap)
EqualHole 0 EqualHole 0
EqualHole Width EqualHole Width
create-glyph 'equal.fc+cf' : glyph-proc create-glyph 'equal.fc+cf' : glyph-proc
Joining.set currentGlyph Joining.Classes.Left
include : difference include : difference
EqualShape (SB - Width) RightSB EqualShape (SB - Width) RightSB
EqualHole 0 EqualHole 0
@ -277,13 +278,14 @@ glyph-block Symbol-Ligation : begin
IdentHole Width IdentHole Width
create-glyph 'ident.fc+cc' : glyph-proc create-glyph 'ident.fc+cc' : glyph-proc
Joining.set currentGlyph Joining.Classes.Right Joining.set currentGlyph Joining.Classes.Mid
include : difference include : difference
IdentShape (SB - Width) (Width - joiningOverlap) IdentShape (SB - Width) (Width - joiningOverlap)
IdentHole 0 IdentHole 0
IdentHole Width IdentHole Width
create-glyph 'ident.fc+cf' : glyph-proc create-glyph 'ident.fc+cf' : glyph-proc
Joining.set currentGlyph Joining.Classes.Left
include : difference include : difference
IdentShape (SB - Width) RightSB IdentShape (SB - Width) RightSB
IdentHole 0 IdentHole 0
@ -297,14 +299,17 @@ glyph-block Symbol-Ligation : begin
glyph-block-import NotGlyphFn : notGlyph glyph-block-import NotGlyphFn : notGlyph
define [slash t b l r sw sh] : dispiro define [slash jk] : function [t b l r sw sh] : glyph-proc
widths.center OperatorStroke Joining.set currentGlyph jk
flat (sh + l) b include : dispiro
curl (sh + r) t widths.center OperatorStroke
flat (sh + l) b
curl (sh + r) t
define [exSlash2 t b l r sw sh] : begin define [exSlash2 jk] : function [t b l r sw sh] : glyph-proc
local dr : PeriodRadius / Stroke * OperatorStroke local dr : PeriodRadius / Stroke * OperatorStroke
union Joining.set currentGlyph jk
include : union
DotAt (sh + l + dr * (r - l) / (t - b)) (b + dr) dr DotAt (sh + l + dr * (r - l) / (t - b)) (b + dr) dr
intersection intersection
Rect (SymbolMid + t) [Math.min (b + dr * 3.5) (SymbolMid - EqualHalfSpace)] (-Width * 4) (Width * 4) Rect (SymbolMid + t) [Math.min (b + dr * 3.5) (SymbolMid - EqualHalfSpace)] (-Width * 4) (Width * 4)
@ -313,15 +318,55 @@ glyph-block Symbol-Ligation : begin
flat (sh + l) b flat (sh + l) b
curl (sh + r) t curl (sh + r) t
notGlyph.generic 'neq.1' null 'sp1' (shift -- (Width * 0.0)) (F -- slash) notGlyph.generic 'neq.1l' null 'sp1'
notGlyph.generic 'neq.2' null 'sp1' (shift -- (Width * 0.5)) (F -- slash) shift -- (Width * 0.0)
notGlyph.generic 'neq.3' null 'sp1' (shift -- (Width * 1.0)) (F -- slash) F -- [slash Joining.Classes.Right]
notGlyph.generic 'neq.4' null 'sp1' (shift -- (Width * 1.5)) (F -- slash) notGlyph.generic 'neq.2l' null 'sp1'
shift -- (Width * 0.5)
F -- [slash Joining.Classes.Right]
notGlyph.generic 'neq.3l' null 'sp1'
shift -- (Width * 1.0)
F -- [slash Joining.Classes.Right]
notGlyph.generic 'neq.4l' null 'sp1'
shift -- (Width * 1.5)
F -- [slash Joining.Classes.Right]
notGlyph.generic 'neq.1m' null 'sp1'
shift -- (Width * 0.0)
F -- [slash Joining.Classes.Mid]
notGlyph.generic 'neq.2m' null 'sp1'
shift -- (Width * 0.5)
F -- [slash Joining.Classes.Mid]
notGlyph.generic 'neq.3m' null 'sp1'
shift -- (Width * 1.0)
F -- [slash Joining.Classes.Mid]
notGlyph.generic 'neq.4m' null 'sp1'
shift -- (Width * 1.5)
F -- [slash Joining.Classes.Mid]
notGlyph.generic 'neq.1-dotted' null 'sp1' (shift -- (Width * 0.0)) (F -- exSlash2) notGlyph.generic 'neq.1l-dotted' null 'sp1'
notGlyph.generic 'neq.2-dotted' null 'sp1' (shift -- (Width * 0.5)) (F -- exSlash2) shift -- (Width * 0.0)
notGlyph.generic 'neq.3-dotted' null 'sp1' (shift -- (Width * 1.0)) (F -- exSlash2) F -- [exSlash2 Joining.Classes.Right]
notGlyph.generic 'neq.4-dotted' null 'sp1' (shift -- (Width * 1.5)) (F -- exSlash2) notGlyph.generic 'neq.2l-dotted' null 'sp1'
shift -- (Width * 0.5)
F -- [exSlash2 Joining.Classes.Right]
notGlyph.generic 'neq.3l-dotted' null 'sp1'
shift -- (Width * 1.0)
F -- [exSlash2 Joining.Classes.Right]
notGlyph.generic 'neq.4l-dotted' null 'sp1'
shift -- (Width * 1.5)
F -- [exSlash2 Joining.Classes.Right]
notGlyph.generic 'neq.1m-dotted' null 'sp1'
shift -- (Width * 0.0)
F -- [exSlash2 Joining.Classes.Mid]
notGlyph.generic 'neq.2m-dotted' null 'sp1'
shift -- (Width * 0.5)
F -- [exSlash2 Joining.Classes.Mid]
notGlyph.generic 'neq.3m-dotted' null 'sp1'
shift -- (Width * 1.0)
F -- [exSlash2 Joining.Classes.Mid]
notGlyph.generic 'neq.4m-dotted' null 'sp1'
shift -- (Width * 1.5)
F -- [exSlash2 Joining.Classes.Mid]
do "<| , |> and <>" do "<| , |> and <>"
glyph-block-import Symbol-Math-Relation-Inequality : LessShape GreaterShape glyph-block-import Symbol-Math-Relation-Inequality : LessShape GreaterShape

View file

@ -37,9 +37,11 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin
include : SlashShape (slashDefautLeft + b) (slashDefaultRight + b) nothing nothing w include : SlashShape (slashDefautLeft + b) (slashDefaultRight + b) nothing nothing w
create-glyph 'slash.left' : glyph-proc create-glyph 'slash.left' : glyph-proc
Joining.set currentGlyph Joining.Classes.Right
include : SlashShape slashDefautLeft Width include : SlashShape slashDefautLeft Width
create-glyph 'slash.right' : glyph-proc create-glyph 'slash.right' : glyph-proc
Joining.set currentGlyph Joining.Classes.Left
include : SlashShape 0 slashDefaultRight include : SlashShape 0 slashDefaultRight
local backslashWidth : (slashDefaultRight - slashDefautLeft) * (1 + TanSlope * 2) local backslashWidth : (slashDefaultRight - slashDefautLeft) * (1 + TanSlope * 2)
@ -57,9 +59,11 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin
alias 'mathBackslash' 0x2216 'backslash' alias 'mathBackslash' 0x2216 'backslash'
create-glyph 'backslash.left' : glyph-proc create-glyph 'backslash.left' : glyph-proc
Joining.set currentGlyph Joining.Classes.Right
include : BackslashShape (Middle - backslashWidth / 2) Width include : BackslashShape (Middle - backslashWidth / 2) Width
create-glyph 'backslash.right' : glyph-proc create-glyph 'backslash.right' : glyph-proc
Joining.set currentGlyph Joining.Classes.Left
include : BackslashShape 0 (Middle + backslashWidth / 2) include : BackslashShape 0 (Middle + backslashWidth / 2)
do "number sign" do "number sign"

View file

@ -724,19 +724,19 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
piecewise piecewise
[hasLG 'eqexeq-dotted'] : chain-rule [hasLG 'eqexeq-dotted'] : chain-rule
equal ~> {'ident.fc'} equal ~> {'ident.fc'}
exclam ~> {'neq.1-dotted'} exclam ~> {'neq.1m-dotted'}
equal ~> {'ident.cc+cf'} equal ~> {'ident.cc+cf'}
[hasLG 'eqexeq'] : chain-rule [hasLG 'eqexeq'] : chain-rule
equal ~> {'ident.fc'} equal ~> {'ident.fc'}
exclam ~> {'neq.1'} exclam ~> {'neq.1m'}
equal ~> {'ident.cc+cf'} equal ~> {'ident.cc+cf'}
[hasLG 'eqexeq-dl-dotted'] : chain-rule [hasLG 'eqexeq-dl-dotted'] : chain-rule
equal ~> {'equal.fc'} equal ~> {'equal.fc'}
exclam ~> {'neq.1-dotted'} exclam ~> {'neq.1m-dotted'}
equal ~> {'equal.cc+cf'} equal ~> {'equal.cc+cf'}
[hasLG 'eqexeq-dl'] : chain-rule [hasLG 'eqexeq-dl'] : chain-rule
equal ~> {'equal.fc'} equal ~> {'equal.fc'}
exclam ~> {'neq.1'} exclam ~> {'neq.1m'}
equal ~> {'equal.cc+cf'} equal ~> {'equal.cc+cf'}
true : chain-rule true : chain-rule
AnyEqualEnding ~> look-around AnyEqualEnding ~> look-around
@ -744,12 +744,12 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
equal ~> look-around equal ~> look-around
piecewise piecewise
[hasLG 'exeq-dotted'] : chain-rule [hasLG 'exeq-dotted'] : chain-rule
exclam ~> {'neq.4-dotted'} exclam ~> {'neq.4l-dotted'}
equal ~> {'equal.fc+cc'} equal ~> {'equal.fc+cc'}
equal ~> {'equal.cc'} equal ~> {'equal.cc'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'neq.4'} exclam ~> {'neq.4l'}
equal ~> {'equal.fc+cc'} equal ~> {'equal.fc+cc'}
equal ~> {'equal.cc'} equal ~> {'equal.cc'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
@ -761,29 +761,29 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
piecewise piecewise
[hasLG 'exeqeq-dotted'] : chain-rule [hasLG 'exeqeq-dotted'] : chain-rule
exclam ~> {'neq.3-dotted'} exclam ~> {'neq.3l-dotted'}
equal ~> {'ident.fc+cc'} equal ~> {'ident.fc+cc'}
equal ~> {'ident.cf'} equal ~> {'ident.cf'}
[hasLG 'exeqeq'] : chain-rule [hasLG 'exeqeq'] : chain-rule
exclam ~> {'neq.3'} exclam ~> {'neq.3l'}
equal ~> {'ident.fc+cc'} equal ~> {'ident.fc+cc'}
equal ~> {'ident.cf'} equal ~> {'ident.cf'}
[hasLG 'exeq-dotted'] : chain-rule [hasLG 'exeq-dotted'] : chain-rule
exclam ~> {'neq.3-dotted'} exclam ~> {'neq.3l-dotted'}
equal ~> {'equal.fc+cc'} equal ~> {'equal.fc+cc'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'neq.3'} exclam ~> {'neq.3l'}
equal ~> {'equal.fc+cc'} equal ~> {'equal.fc+cc'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
piecewise piecewise
[hasLG 'eqslasheq'] : chain-rule [hasLG 'eqslasheq'] : chain-rule
equal ~> {'ident.fc'} equal ~> {'ident.fc'}
slash ~> {'neq.1'} slash ~> {'neq.1m'}
equal ~> {'ident.cc+cf'} equal ~> {'ident.cc+cf'}
[hasLG 'slasheq'] : chain-rule [hasLG 'slasheq'] : chain-rule
equal ~> {'equal.fc'} equal ~> {'equal.fc'}
slash ~> {'neq.1'} slash ~> {'neq.1m'}
equal ~> {'equal.cc+cf'} equal ~> {'equal.cc+cf'}
piecewise piecewise
[hasLG 'eqeqeq'] : chain-rule [hasLG 'eqeqeq'] : chain-rule
@ -792,25 +792,25 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] :
equal ~> {'ident.cf'} equal ~> {'ident.cf'}
piecewise piecewise
[hasLG 'tildeeq'] : chain-rule [hasLG 'tildeeq'] : chain-rule
anyWave ~> [just 'neq.2'] anyWave ~> [just 'neq.2l']
equal ~> {'equal.fc+cf'} equal ~> {'equal.fc+cf'}
piecewise piecewise
[hasLG 'slasheq'] : chain-rule [hasLG 'slasheq'] : chain-rule
slash ~> {'neq.2'} slash ~> {'neq.2l'}
equal ~> {'equal.fc+cf'} equal ~> {'equal.fc+cf'}
piecewise piecewise
[hasLG 'exeq-dotted'] : chain-rule [hasLG 'exeq-dotted'] : chain-rule
exclam ~> {'neq.2-dotted'} exclam ~> {'neq.2l-dotted'}
equal ~> {'equal.fc+cf'} equal ~> {'equal.fc+cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'neq.2'} exclam ~> {'neq.2l'}
equal ~> {'equal.fc+cf'} equal ~> {'equal.fc+cf'}
piecewise piecewise
[hasLG 'ltgt-diamond'] : chain-rule [hasLG 'ltgt-diamond'] : chain-rule
lessAndEquiv ~> [just 'less.lig.diamond'] lessAndEquiv ~> [just 'less.lig.diamond']
greaterAndEquiv ~> [just 'greater.lig.diamond'] greaterAndEquiv ~> [just 'greater.lig.diamond']
[hasLG 'ltgt-ne'] : chain-rule [hasLG 'ltgt-ne'] : chain-rule
lessAndEquiv ~> [just 'neq.2'] lessAndEquiv ~> [just 'neq.2l']
greaterAndEquiv ~> [just 'equal.fc+cf'] greaterAndEquiv ~> [just 'equal.fc+cf']
piecewise piecewise
[hasLG 'eqeq'] : chain-rule [hasLG 'eqeq'] : chain-rule