Add variant selector to remove notches for equality ligations (#1425).
This commit is contained in:
parent
d5346169ad
commit
b8f463a4d8
5 changed files with 55 additions and 88 deletions
|
@ -1 +1,2 @@
|
||||||
|
* Add variant selector to remove notches for equality ligations (#1425).
|
||||||
* Fix `cv40`'s application to CYRILLIC SMALL LETTER ER (`U+0440`) (#1426).
|
* Fix `cv40`'s application to CYRILLIC SMALL LETTER ER (`U+0440`) (#1426).
|
|
@ -255,100 +255,43 @@ glyph-block Symbol-Ligation : begin
|
||||||
glyph-block-import Symbol-Math-Relation-Common : EqualHalfSpace
|
glyph-block-import Symbol-Math-Relation-Common : EqualHalfSpace
|
||||||
glyph-block-import Symbol-Math-Relation-Equal : EqualShape EqualHole IdentShape IdentHole
|
glyph-block-import Symbol-Math-Relation-Equal : EqualShape EqualHole IdentShape IdentHole
|
||||||
define joiningOverlap (-Width / 6)
|
define joiningOverlap (-Width / 6)
|
||||||
create-glyph 'equal.fc' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Right
|
|
||||||
include : difference
|
|
||||||
EqualShape SB (Width - joiningOverlap)
|
|
||||||
EqualHole Width
|
|
||||||
|
|
||||||
create-glyph 'equal.cf' : glyph-proc
|
define SymbolConfig : object
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
"equal" { EqualShape EqualHole }
|
||||||
include : difference
|
"ident" { IdentShape IdentHole }
|
||||||
EqualShape joiningOverlap RightSB
|
|
||||||
EqualHole 0
|
|
||||||
|
|
||||||
create-glyph 'equal.jf' : glyph-proc
|
define JoinConfig : object
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
# Shape Left Shape Right Hole positions
|
||||||
include : difference
|
"fc" { SB (Width - joiningOverlap) { Width } }
|
||||||
EqualShape (RightSB - Width + joiningOverlap) RightSB
|
"cf" { joiningOverlap RightSB { 0 } }
|
||||||
EqualHole 0
|
"jf" { (RightSB - Width + joiningOverlap) RightSB { 0 } }
|
||||||
|
"cc" { joiningOverlap (Width - joiningOverlap) { 0 Width } }
|
||||||
|
"fc+cc" { (SB - Width) (Width - joiningOverlap) { 0 Width } }
|
||||||
|
"fc+cf" { (SB - Width) RightSB { 0 } }
|
||||||
|
"cc+cf" { (joiningOverlap - Width) RightSB { (-Width) 0 } }
|
||||||
|
|
||||||
create-glyph 'equal.cc' : glyph-proc
|
define NotchConfig : object
|
||||||
Joining.set currentGlyph Joining.Classes.Mid
|
withNotch { true }
|
||||||
include : difference
|
withoutNotch { false }
|
||||||
EqualShape joiningOverlap (Width - joiningOverlap)
|
|
||||||
EqualHole 0
|
|
||||||
EqualHole Width
|
|
||||||
|
|
||||||
create-glyph 'equal.fc+cc' : glyph-proc
|
foreach { prefix { Shape Hole } } [Object.entries SymbolConfig] : do
|
||||||
Joining.set currentGlyph Joining.Classes.Mid
|
foreach { infix { shapeLeft shapeRight xHoles } } [Object.entries JoinConfig] : do
|
||||||
include : difference
|
local joinCls 0
|
||||||
EqualShape (SB - Width) (Width - joiningOverlap)
|
if (shapeLeft < 0) : set joinCls : joinCls + Joining.Classes.Left
|
||||||
EqualHole 0
|
if (shapeRight > Width) : set joinCls : joinCls + Joining.Classes.Right
|
||||||
EqualHole Width
|
|
||||||
|
|
||||||
create-glyph 'equal.fc+cf' : glyph-proc
|
foreach { suffix { doNotch } } [Object.entries NotchConfig] : do
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
create-glyph "\(prefix).\(infix).\(suffix)" : glyph-proc
|
||||||
|
Joining.set currentGlyph joinCls
|
||||||
include : difference
|
include : difference
|
||||||
EqualShape (SB - Width) RightSB
|
Shape shapeLeft shapeRight
|
||||||
EqualHole 0
|
if doNotch
|
||||||
|
: then : union.apply null [xHoles.map Hole]
|
||||||
|
: else : glyph-proc
|
||||||
|
|
||||||
create-glyph 'equal.cc+cf' : glyph-proc
|
select-variant "\(prefix).\(infix)" (follow -- "lig-\(prefix)")
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
|
||||||
include : difference
|
|
||||||
EqualShape (joiningOverlap - Width) RightSB
|
|
||||||
EqualHole (-Width)
|
|
||||||
EqualHole 0
|
|
||||||
|
|
||||||
create-glyph 'ident.fc' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Right
|
|
||||||
include : difference
|
|
||||||
IdentShape SB (Width - joiningOverlap)
|
|
||||||
IdentHole Width
|
|
||||||
|
|
||||||
create-glyph 'ident.cf' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
|
||||||
include : difference
|
|
||||||
IdentShape joiningOverlap RightSB
|
|
||||||
IdentHole 0
|
|
||||||
|
|
||||||
create-glyph 'ident.jf' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
|
||||||
include : difference
|
|
||||||
IdentShape (RightSB - Width + joiningOverlap) RightSB
|
|
||||||
IdentHole 0
|
|
||||||
|
|
||||||
create-glyph 'ident.cc' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Mid
|
|
||||||
include : difference
|
|
||||||
IdentShape joiningOverlap (Width - joiningOverlap)
|
|
||||||
IdentHole 0
|
|
||||||
IdentHole Width
|
|
||||||
|
|
||||||
create-glyph 'ident.fc+cc' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Mid
|
|
||||||
include : difference
|
|
||||||
IdentShape (SB - Width) (Width - joiningOverlap)
|
|
||||||
IdentHole 0
|
|
||||||
IdentHole Width
|
|
||||||
|
|
||||||
create-glyph 'ident.fc+cf' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
|
||||||
include : difference
|
|
||||||
IdentShape (SB - Width) RightSB
|
|
||||||
IdentHole 0
|
|
||||||
|
|
||||||
create-glyph 'ident.cc+cf' : glyph-proc
|
|
||||||
Joining.set currentGlyph Joining.Classes.Left
|
|
||||||
include : difference
|
|
||||||
IdentShape (joiningOverlap - Width) RightSB
|
|
||||||
IdentHole (-Width)
|
|
||||||
IdentHole 0
|
|
||||||
|
|
||||||
### Inequality
|
### Inequality
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
define Neq : namespace
|
define Neq : namespace
|
||||||
export : define Sw OperatorStroke
|
export : define Sw OperatorStroke
|
||||||
export : define Dr : Sw / Stroke * DotRadius
|
export : define Dr : Sw / Stroke * DotRadius
|
||||||
|
|
|
@ -6690,6 +6690,25 @@ selector."neq.bar-only" = "moreSlanted"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[prime.lig-equal-chain]
|
||||||
|
sampler = "== "
|
||||||
|
samplerExplain = "Equality ligations"
|
||||||
|
tag = "VXAG"
|
||||||
|
|
||||||
|
[prime.lig-equal-chain.variants.with-notch]
|
||||||
|
rank = 1
|
||||||
|
description = "The bars in equality (`==`, etc.) ligation have notches in the middle"
|
||||||
|
selector."lig-equal" = "withNotch"
|
||||||
|
selector."lig-ident" = "withNotch"
|
||||||
|
|
||||||
|
[prime.lig-equal-chain.variants.without-notch]
|
||||||
|
rank = 2
|
||||||
|
description = "The bars in equality (`==`, etc.) ligation do not have notches in the middle"
|
||||||
|
selector."lig-equal" = "withoutNotch"
|
||||||
|
selector."lig-ident" = "withoutNotch"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# This is a special variant selector that controls digit form
|
# This is a special variant selector that controls digit form
|
||||||
[prime.digit-form]
|
[prime.digit-form]
|
||||||
isSpecial = true
|
isSpecial = true
|
||||||
|
@ -6824,6 +6843,7 @@ question = "smooth"
|
||||||
punctuation-dot = "round"
|
punctuation-dot = "round"
|
||||||
diacritic-dot = "round"
|
diacritic-dot = "round"
|
||||||
lig-neq = "slightly-slanted"
|
lig-neq = "slightly-slanted"
|
||||||
|
lig-equal-chain = "with-notch"
|
||||||
|
|
||||||
# m, n, h has tailed variant, but not very ideal
|
# m, n, h has tailed variant, but not very ideal
|
||||||
# Do not make them default
|
# Do not make them default
|
||||||
|
@ -7209,6 +7229,7 @@ at = "short"
|
||||||
cent = "open"
|
cent = "open"
|
||||||
percent = "rings-continuous-slash"
|
percent = "rings-continuous-slash"
|
||||||
lig-ltgteq = "slanted"
|
lig-ltgteq = "slanted"
|
||||||
|
lig-equal-chain = "without-notch"
|
||||||
|
|
||||||
[composite.ss05.slab-override.design]
|
[composite.ss05.slab-override.design]
|
||||||
capital-d = "more-rounded-bilateral-serifed"
|
capital-d = "more-rounded-bilateral-serifed"
|
||||||
|
@ -7366,6 +7387,7 @@ at = "threefold"
|
||||||
dollar = "open"
|
dollar = "open"
|
||||||
cent = "open"
|
cent = "open"
|
||||||
percent = "dots"
|
percent = "dots"
|
||||||
|
lig-equal-chain = "without-notch"
|
||||||
|
|
||||||
[composite.ss08.italic]
|
[composite.ss08.italic]
|
||||||
g = "single-storey-serifless"
|
g = "single-storey-serifless"
|
||||||
|
@ -7666,6 +7688,7 @@ percent = "rings-continuous-slash"
|
||||||
lig-ltgteq = "slanted"
|
lig-ltgteq = "slanted"
|
||||||
question = "corner-flat-hooked"
|
question = "corner-flat-hooked"
|
||||||
lig-neq = "more-slanted"
|
lig-neq = "more-slanted"
|
||||||
|
lig-equal-chain = "without-notch"
|
||||||
|
|
||||||
[composite.ss14.italic]
|
[composite.ss14.italic]
|
||||||
a = "single-storey-serifless"
|
a = "single-storey-serifless"
|
||||||
|
|
|
@ -5,7 +5,7 @@ const ssStrings = [
|
||||||
["ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ", "abc.def.ghi.jkl.mno.pqrs.tuv.wxyz"],
|
["ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ", "abc.def.ghi.jkl.mno.pqrs.tuv.wxyz"],
|
||||||
["¢ ſß ΓΛΔ αδιλμξ КУЗЯЖэльфязычникж", "float il1[]={1-2/3.4,5+6=7/8%90};"],
|
["¢ ſß ΓΛΔ αδιλμξ КУЗЯЖэльфязычникж", "float il1[]={1-2/3.4,5+6=7/8%90};"],
|
||||||
["1234567890 ,._-+= >< ¯-¬_ >~–÷+×<", "{}[]()<>`+-=$*/#_%^@\\&|~?'\" !,.;:"],
|
["1234567890 ,._-+= >< ¯-¬_ >~–÷+×<", "{}[]()<>`+-=$*/#_%^@\\&|~?'\" !,.;:"],
|
||||||
["!iIlL17|¦ coO08BbDQ $5SZ2zsz 96G&", [..."dbqp E3 g9q CGQ vvw VVW ", "<=", " ", "!=", " ", ">="]]
|
["!iIlL17|¦ coO08BbDQ $5SZ2zsz 96G&", [..."dbqp E3 g9qCGQ vvwVVW ", "<=", " ", "!="," ","==", " ", ">="]]
|
||||||
];
|
];
|
||||||
|
|
||||||
function* makeSample(lbm, hotChars) {
|
function* makeSample(lbm, hotChars) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ const ssStrings = [
|
||||||
["ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ", "abc.def.ghi.jkl.mno.pqrs.tuv.wxyz"],
|
["ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ", "abc.def.ghi.jkl.mno.pqrs.tuv.wxyz"],
|
||||||
["¢ ſß ΓΛΔ αδιλμξ КУЗЯЖэльфязычникж", "float il1[]={1-2/3.4,5+6=7/8%90};"],
|
["¢ ſß ΓΛΔ αδιλμξ КУЗЯЖэльфязычникж", "float il1[]={1-2/3.4,5+6=7/8%90};"],
|
||||||
["1234567890 ,._-+= >< ¯-¬_ >~–÷+×<", "{}[]()<>`+-=$*/#_%^@\\&|~?'\" !,.;:"],
|
["1234567890 ,._-+= >< ¯-¬_ >~–÷+×<", "{}[]()<>`+-=$*/#_%^@\\&|~?'\" !,.;:"],
|
||||||
["!iIlL17|¦ coO08BbDQ $5SZ2zsz 96G&", [..."dbqp E3 g9q CGQ vvw VVW ", "<=", " ", "!=", " ", ">="]]
|
["!iIlL17|¦ coO08BbDQ $5SZ2zsz 96G&", [..."dbqp E3 g9qCGQ vvwVVW ", "<=", " ", "!="," ","==", " ", ">="]]
|
||||||
];
|
];
|
||||||
|
|
||||||
function* makeSample(theme, lbm, features, hotChars) {
|
function* makeSample(theme, lbm, features, hotChars) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue