Add calt-exeq-alt-1 as an alternative style of != ligation (#608).

This commit is contained in:
be5invis 2020-07-03 02:48:45 -07:00
parent a0a68fa501
commit 8d28c598dc
10 changed files with 336 additions and 183 deletions

View file

@ -85,7 +85,7 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
# upright = ["upright-styles"] # Uncomment this line to set styles for upright only # upright = ["upright-styles"] # Uncomment this line to set styles for upright only
# italic = ["italic-styles"] # Uncomment this line to set styles for italic only # italic = ["italic-styles"] # Uncomment this line to set styles for italic only
# oblique = ["oblique-styles"] # Uncomment this line to set styles for oblique only # oblique = ["oblique-styles"] # Uncomment this line to set styles for oblique only
hintParams = ["-a", "sss"] # Optional custom parameters for ttfautohint # hintParams = ["-a", "sss"] # Optional custom parameters for ttfautohint
################################################################################################### ###################################################################################################
# Override default building weights # Override default building weights
@ -262,6 +262,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* `calt-exeqeq`: Enable special triple-line ligation for `!==` only. * `calt-exeqeq`: Enable special triple-line ligation for `!==` only.
* `calt-eqexeq`: Enable special triple-line ligation for `=!=` only. * `calt-eqexeq`: Enable special triple-line ligation for `=!=` only.
* `calt-exeq`: Enable ligation for `!=` and `!==`. * `calt-exeq`: Enable ligation for `!=` and `!==`.
* `calt-exeq-alt-1`: Enable ligation for `!=` and `!==` with a dot at below for distinction.
* `calt-tildeeq`: Enable ligation for `~=` as inequality. * `calt-tildeeq`: Enable ligation for `~=` as inequality.
* `calt-eqslasheq`: Enable special triple-line ligation for `=/=` as inequality. * `calt-eqslasheq`: Enable special triple-line ligation for `=/=` as inequality.
* `calt-slasheq`: Enable ligation for `/=` and `=/=` as inequality. * `calt-slasheq`: Enable ligation for `/=` and `=/=` as inequality.
@ -318,6 +319,15 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* `v-f-tailed`, `cv53`: `f` with a leftward bottom hook (default for Italic). * `v-f-tailed`, `cv53`: `f` with a leftward bottom hook (default for Italic).
* `v-f-serifed`, `cv84`: `f` with bottom serif (default for Slab Upright). * `v-f-serifed`, `cv84`: `f` with bottom serif (default for Slab Upright).
* `v-f-straight-tailed`, `VXAD`: `f` with straight tail. * `v-f-straight-tailed`, `VXAD`: `f` with straight tail.
* Styles for `b`:
* `v-b-toothed`, `VXBK`: `b` with bottom-left tooth (default).
* `v-b-toothless-corner`, `VXBL`: `b` without botton-left tooth, with a corner transition.
* `v-b-toothless-rounded`, `VXBM`: `b` without botton-left tooth, with a rounded transition.
* Styles for `d`:
* `v-d-toothed`, `VXBN`: `d` with bottom-right tooth (default).
* `v-d-toothless-corner`, `VXBO`: `d` without botton-right tooth, with a corner transition.
* `v-d-toothless-rounded`, `VXBP`: `d` without botton-right tooth, with a rounded transition.
* `v-d-tailed`, `VXBQ`: `d` with a slightly tail botton-right tail.
* Styles for `g`: * Styles for `g`:
* `v-g-doublestorey`, `cv11`: Double-storey `g`. * `v-g-doublestorey`, `cv11`: Double-storey `g`.
* `v-g-singlestorey`, `cv12`: Single-storey `g` (default). * `v-g-singlestorey`, `cv12`: Single-storey `g` (default).
@ -335,9 +345,10 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* `v-j-serifed`, `cv58`: `j` with top serif (default). * `v-j-serifed`, `cv58`: `j` with top serif (default).
* `v-j-straight`, `cv98`: `j` without serif. * `v-j-straight`, `cv98`: `j` without serif.
* Styles for `k`, `K`: * Styles for `k`, `K`:
* `v-k-straight`, `cv68`: `k` with standard shape (default for Upright). * `v-k-straight`, `cv68`: `k` and `K` with standard shape (default for Upright).
* `v-k-curly`, `cv69`: Slightly curly `k`, like Iosevka 2.x. * `v-k-curly`, `cv69`: Slightly curly `k` and `K`, like Iosevka 2.x.
* `v-k-cursive`, `cv70`: `k` with a cursive loop (default for Italic). * `v-k-cursive`, `cv70`: `k` with a cursive loop, and `K` with standard shape (default for Italic).
* `v-k-curly-cursive`, `VXBR`: `k` with a cursive loop, and `K` with curly shape.
* Styles for `l`: * Styles for `l`:
* `v-l-serifed`, `cv07`: Serifed `l` (default for Upright). * `v-l-serifed`, `cv07`: Serifed `l` (default for Upright).
* `v-l-italic`, `cv08`: Italic, cursive `l` (default for Italic). * `v-l-italic`, `cv08`: Italic, cursive `l` (default for Italic).
@ -385,6 +396,9 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `B`: * Styles for `B`:
* `v-capital-b-standard`, `VXAP`: Standard `B` (default). * `v-capital-b-standard`, `VXAP`: Standard `B` (default).
* `v-capital-b-more-asymmetric`, `VXAQ`: More asymmetric `B` to differentiate with `8`. * `v-capital-b-more-asymmetric`, `VXAQ`: More asymmetric `B` to differentiate with `8`.
* Styles for `D`:
* `v-capital-d-standard`, `VXBG`: Standard `D` (default).
* `v-capital-d-more-rounded`, `VXBH`: More rounded `D` to differentiate with `O`.
* Styles for `G`: * Styles for `G`:
* `v-capital-g-tooth`, `cv91`: Toothed G (default). * `v-capital-g-tooth`, `cv91`: Toothed G (default).
* `v-capital-g-toothless`, `cv92`: Toothless G. * `v-capital-g-toothless`, `cv92`: Toothless G.
@ -464,6 +478,8 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `#`: * Styles for `#`:
* `v-numbersign-upright`, `cv44`: Number sign with vertical bars (default). * `v-numbersign-upright`, `cv44`: Number sign with vertical bars (default).
* `v-numbersign-slanted`, `cv45`: Number sign with slanted bars. * `v-numbersign-slanted`, `cv45`: Number sign with slanted bars.
* `v-numbersign-upright-open`, `VXBI`: Number sign with vertical bars and open inner.
* `v-numbersign-slanted-open`, `VXBJ`: Number sign with slanted bars and open inner.
* Styles for `&`: * Styles for `&`:
* `v-ampersand-closed`, `VXAG`: Ampersand (`&`) with a closed contour (default). * `v-ampersand-closed`, `VXAG`: Ampersand (`&`) with a closed contour (default).
* `v-ampersand-upper-open`, `VXAH`: Ampersand (`&`) with an open contour at upper half. * `v-ampersand-upper-open`, `VXAH`: Ampersand (`&`) with an open contour at upper half.

View file

@ -5,3 +5,4 @@
* Add toothless variant of `b` and `d` (#462). * Add toothless variant of `b` and `d` (#462).
* Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625). * Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625).
* Add `v-k-curly-cursive` combination (#627). * Add `v-k-curly-cursive` combination (#627).
* Add `calt-exeq-alt-1` as an alternative style of `!=` ligation (#608).

View file

@ -9,19 +9,32 @@ glyph-module
glyph-block NotGlyphFn : begin glyph-block NotGlyphFn : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-export notGlyph glyph-block-export notGlyph
define [notGlyph unicode oldid top bot prop shift newid]
create-glyph [fallback newid ('not' + oldid)] : glyph-construction
if unicode : assign-unicode unicode
include [refer-glyph oldid]
include : dispiro
widths.center [adviceBlackness 4]
flat ([fallback shift 0] + [mix SB RightSB [fallback prop 0.25]]) [fallback bot bgopBot]
curl ([fallback shift 0] + [mix RightSB SB [fallback prop 0.25]]) [fallback top bgopTop]
define [notGlyph.right unicode oldid top bot prop shift] define [notGlyphGeneric newid unicode oldid top bot prop shift F] : begin
notGlyph unicode oldid top bot prop (-OperatorStroke * 0.5) create-glyph (newid || 'not' + oldid) : glyph-construction
define [notGlyph.left unicode oldid top bot prop shift] if unicode : assign-unicode unicode
notGlyph unicode oldid top bot prop (OperatorStroke * 0.5) include : refer-glyph oldid
include : F
fallback top bgopTop
fallback bot bgopBot
mix SB RightSB [fallback prop 0.25]
mix RightSB SB [fallback prop 0.25]
adviceBlackness 4
fallback shift 0
define [notGlyph] : params [newid unicode oldid top bot prop shift] : begin
notGlyphGeneric newid unicode oldid top bot prop shift
lambda [t b l r sw sh] : dispiro
widths.center sw
flat (sh + l) b
curl (sh + r) t
define [notGlyph.right] : params [newid unicode oldid top bot prop shift] : begin
notGlyph newid unicode oldid top bot prop (-OperatorStroke * 0.5)
define [notGlyph.left] : params [newid unicode oldid top bot prop shift] : begin
notGlyph newid unicode oldid top bot prop (OperatorStroke * 0.5)
define [notGlyph.generic] : params [newid unicode oldid top bot prop shift F] : begin
notGlyphGeneric newid unicode oldid top bot prop shift F
glyph-block Symbol-Math-Letter-Like : begin glyph-block Symbol-Math-Letter-Like : begin
@ -683,34 +696,34 @@ glyph-block Symbol-Math-Relation : begin
glyph-block-import Overmarks : TildeShape glyph-block-import Overmarks : TildeShape
glyph-block-export dH lessSlantness glyph-block-export dH lessSlantness
glyph-block-export LessShape GreaterShape LigationLessShape LigationGreaterShape glyph-block-export LessShape GreaterShape LigationLessShape LigationGreaterShape
glyph-block-export EqualShape EqualHole IdentShape IdentHole glyph-block-export EqualShape EqualHole IdentShape IdentHole EqualHalfSpace
define equalHalfSpace : (operTop - operBot) * 2 * designParameters.equal_wideness define EqualHalfSpace : (operTop - operBot) * 2 * designParameters.equal_wideness
define lessSlantness : (4 / 13) * (operTop - operBot) / (RightSB - SB) define lessSlantness : (4 / 13) * (operTop - operBot) / (RightSB - SB)
define dH : lessSlantness * (RightSB - SB) define dH : lessSlantness * (RightSB - SB)
define lessEqDist : Math.max [adviceBlackness 4] (XH * 0.16) define lessEqDist : Math.max [adviceBlackness 4] (XH * 0.16)
define [EqualShape left right] : union define [EqualShape left right] : union
HBar left right (symbolMid + equalHalfSpace) OperatorStroke HBar left right (symbolMid + EqualHalfSpace) OperatorStroke
HBar left right (symbolMid - equalHalfSpace) OperatorStroke HBar left right (symbolMid - EqualHalfSpace) OperatorStroke
define [EqualHole x] define [EqualHole x]
VBar x (symbolMid - equalHalfSpace) (symbolMid + equalHalfSpace) [adviceBlackness 6] VBar x (symbolMid - EqualHalfSpace) (symbolMid + EqualHalfSpace) [adviceBlackness 6]
define [IdentShape left right] : union define [IdentShape left right] : union
HBar left right (symbolMid + equalHalfSpace * 1.5) OperatorStroke HBar left right (symbolMid + EqualHalfSpace * 1.5) OperatorStroke
HBar left right symbolMid OperatorStroke HBar left right symbolMid OperatorStroke
HBar left right (symbolMid - equalHalfSpace * 1.5) OperatorStroke HBar left right (symbolMid - EqualHalfSpace * 1.5) OperatorStroke
define [IdentHole x] define [IdentHole x]
VBar x (symbolMid - equalHalfSpace * 1.5) (symbolMid + equalHalfSpace * 1.5) [adviceBlackness 6] VBar x (symbolMid - EqualHalfSpace * 1.5) (symbolMid + EqualHalfSpace * 1.5) [adviceBlackness 6]
sketch # equal sketch # equal
include : EqualShape SB RightSB include : EqualShape SB RightSB
save 'equal' '=' save 'equal' '='
branch branch
include : DotAt [mix SB RightSB (1/6)] (symbolMid + equalHalfSpace * 2.5) DotRadius include : DotAt [mix SB RightSB (1/6)] (symbolMid + EqualHalfSpace * 2.5) DotRadius
include : DotAt [mix SB RightSB (5/6)] (symbolMid - equalHalfSpace * 2.5) DotRadius include : DotAt [mix SB RightSB (5/6)] (symbolMid - EqualHalfSpace * 2.5) DotRadius
save 'twodotapproxeq' 0x2252 save 'twodotapproxeq' 0x2252
sketch # colon-equal sketch # colon-equal
@ -732,10 +745,10 @@ glyph-block Symbol-Math-Relation : begin
save 'ident' 0x2261 save 'ident' 0x2261
sketch # iiiident sketch # iiiident
include : HBar SB RightSB (symbolMid + equalHalfSpace * 2.25) OperatorStroke include : HBar SB RightSB (symbolMid + EqualHalfSpace * 2.25) OperatorStroke
include : HBar SB RightSB (symbolMid + equalHalfSpace * 0.75) OperatorStroke include : HBar SB RightSB (symbolMid + EqualHalfSpace * 0.75) OperatorStroke
include : HBar SB RightSB (symbolMid - equalHalfSpace * 0.75) OperatorStroke include : HBar SB RightSB (symbolMid - EqualHalfSpace * 0.75) OperatorStroke
include : HBar SB RightSB (symbolMid - equalHalfSpace * 2.25) OperatorStroke include : HBar SB RightSB (symbolMid - EqualHalfSpace * 2.25) OperatorStroke
save 'iiiident' 0x2263 save 'iiiident' 0x2263
define [LessGreaterExpansion top bot l r] define [LessGreaterExpansion top bot l r]
@ -817,7 +830,7 @@ glyph-block Symbol-Math-Relation : begin
Rect ([mix top bot 0.5] + gap / 2) ([mix top bot 0.5] - gap / 2) (l + O) (r - O) Rect ([mix top bot 0.5] + gap / 2) ([mix top bot 0.5] - gap / 2) (l + O) (r - O)
# Sym parameters # Sym parameters
local approxDist : equalHalfSpace * 1.75 local approxDist : EqualHalfSpace * 1.75
local symMag : (operTop - symbolMid) * 0.17 local symMag : (operTop - symbolMid) * 0.17
define [symWave height mul] : TildeShape define [symWave height mul] : TildeShape
ttop -- height + symMag * mul ttop -- height + symMag * mul
@ -1074,22 +1087,22 @@ glyph-block Symbol-Math-Relation : begin
save 'symBar' 0x2243 save 'symBar' 0x2243
sketch # symBarBar sketch # symBarBar
local sympShift : approxDist + equalHalfSpace * 1.5 local sympShift : approxDist + EqualHalfSpace * 1.5
include [refer-glyph 'sym'] AS_BASE include [refer-glyph 'sym'] AS_BASE
include : Upright include : Upright
include : Translate 0 (sympShift / 2) include : Translate 0 (sympShift / 2)
include : Italify include : Italify
include : HBar SB RightSB (symbolMid - sympShift / 2 + equalHalfSpace * 1.5) OperatorStroke include : HBar SB RightSB (symbolMid - sympShift / 2 + EqualHalfSpace * 1.5) OperatorStroke
include : HBar SB RightSB (symbolMid - sympShift / 2) OperatorStroke include : HBar SB RightSB (symbolMid - sympShift / 2) OperatorStroke
save 'symBarBar' 0x2245 save 'symBarBar' 0x2245
sketch # flipsymBarBar sketch # flipsymBarBar
local sympShift : approxDist + equalHalfSpace * 1.5 local sympShift : approxDist + EqualHalfSpace * 1.5
include [refer-glyph 'flipsym'] AS_BASE include [refer-glyph 'flipsym'] AS_BASE
include : Upright include : Upright
include : Translate 0 (sympShift / 2) include : Translate 0 (sympShift / 2)
include : Italify include : Italify
include : HBar SB RightSB (symbolMid - sympShift / 2 + equalHalfSpace * 1.5) OperatorStroke include : HBar SB RightSB (symbolMid - sympShift / 2 + EqualHalfSpace * 1.5) OperatorStroke
include : HBar SB RightSB (symbolMid - sympShift / 2) OperatorStroke include : HBar SB RightSB (symbolMid - sympShift / 2) OperatorStroke
save 'flipsymBarBar' 0x224C save 'flipsymBarBar' 0x224C
@ -1180,37 +1193,37 @@ glyph-block Symbol-Math-Complement : begin
glyph-block Symbol-Math-Negation : begin glyph-block Symbol-Math-Negation : begin
glyph-block-import NotGlyphFn : notGlyph glyph-block-import NotGlyphFn : notGlyph
notGlyph 0x2260 'equal' notGlyph null 0x2260 'equal'
notGlyph 0x2262 'ident' notGlyph null 0x2262 'ident'
notGlyph 0x22AC 'vdash' notGlyph null 0x22AC 'vdash'
notGlyph 0x22AD 'tautology' notGlyph null 0x22AD 'tautology'
notGlyph 0x22AE 'forces' notGlyph null 0x22AE 'forces'
notGlyph 0x22AF 'doubleForces' notGlyph null 0x22AF 'doubleForces'
notGlyph.left 0x226E 'less' notGlyph.left null 0x226E 'less'
notGlyph.right 0x226F 'greater' notGlyph.right null 0x226F 'greater'
notGlyph.left 0x2280 'precedes' notGlyph.left null 0x2280 'precedes'
notGlyph.right 0x2281 'succeeds' notGlyph.right null 0x2281 'succeeds'
notGlyph 0x2241 'sym' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75] notGlyph null 0x2241 'sym' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75]
notGlyph 0x2244 'symBar' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75] notGlyph null 0x2244 'symBar' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75]
notGlyph 0x2247 'symBarBar' notGlyph null 0x2247 'symBarBar'
notGlyph 0x2249 'approx' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75] notGlyph null 0x2249 'approx' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75]
notGlyph.left 0x2284 'subst' notGlyph.left null 0x2284 'subst'
notGlyph.right 0x2285 'supst' notGlyph.right null 0x2285 'supst'
notGlyph.left 0x2288 'substBar' notGlyph.left null 0x2288 'substBar'
notGlyph.right 0x2289 'supstBar' notGlyph.right null 0x2289 'supstBar'
notGlyph.left 0x22E2 'prefixBar' notGlyph.left null 0x22E2 'prefixBar'
notGlyph.right 0x22E3 'suffixBar' notGlyph.right null 0x22E3 'suffixBar'
notGlyph.left 0x2209 'element' notGlyph.left null 0x2209 'element'
notGlyph.right 0x220C 'turnelement' notGlyph.right null 0x220C 'turnelement'
notGlyph.left 0x2270 'lesseq' notGlyph.left null 0x2270 'lesseq'
notGlyph.right 0x2271 'greatereq' notGlyph.right null 0x2271 'greatereq'
notGlyph.left 0x2274 'lesssym' notGlyph.left null 0x2274 'lesssym'
notGlyph.right 0x2275 'greatersym' notGlyph.right null 0x2275 'greatersym'
notGlyph.left 0x22E0 'precedeseqslant' notGlyph.left null 0x22E0 'precedeseqslant'
notGlyph.right 0x22E1 'succeedseqslant' notGlyph.right null 0x22E1 'succeedseqslant'
notGlyph 0x2278 'lessgreater' notGlyph null 0x2278 'lessgreater'
notGlyph 0x2279 'greaterless' notGlyph null 0x2279 'greaterless'
notGlyph.right 0x2204 'exists' (CAP - Descender / 2) (Descender / 2) 0.4 notGlyph.right null 0x2204 'exists' (CAP - Descender / 2) (Descender / 2) 0.4
glyph-block Symbol-Math-Large-Operators : for-width-kinds WideWidth1 glyph-block Symbol-Math-Large-Operators : for-width-kinds WideWidth1
glyph-block-import CommonShapes glyph-block-import CommonShapes
@ -1452,8 +1465,8 @@ glyph-block Symbol-Math-Other : begin
alias 'mathbullet' 0x2219 'bullet' alias 'mathbullet' 0x2219 'bullet'
alias 'mathbar' 0x2223 'bar' alias 'mathbar' 0x2223 'bar'
notGlyph 0x2224 'mathbar' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0.1 notGlyph null 0x2224 'mathbar' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0.1
notGlyph 0x2226 'parallel' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0 notGlyph null 0x2226 'parallel' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0
alias 'mathsmallcircle' 0x2218 'smallwhitecircle.NWID' alias 'mathsmallcircle' 0x2218 'smallwhitecircle.NWID'
alias 'whiteDiamondOperator' 0x22C4 'whitediamond.NWID' alias 'whiteDiamondOperator' 0x22C4 'whitediamond.NWID'
alias 'mathstar' 0x22C6 'blackstar.NWID' alias 'mathstar' 0x22C6 'blackstar.NWID'

View file

@ -1513,7 +1513,7 @@ glyph-block Symbol-Other-Ligation : begin
save 'greater.lig.hole.shiftN1' save 'greater.lig.hole.shiftN1'
do "Equal and Inequal" : if [not recursive] : begin do "Equal and Inequal" : if [not recursive] : begin
glyph-block-import Symbol-Math-Relation : EqualShape EqualHole IdentShape IdentHole glyph-block-import Symbol-Math-Relation : EqualShape EqualHole IdentShape IdentHole EqualHalfSpace
define joiningOverlap (-Width / 6) define joiningOverlap (-Width / 6)
sketch # equal.fc sketch # equal.fc
include : difference include : difference
@ -1567,12 +1567,33 @@ glyph-block Symbol-Other-Ligation : begin
save 'ident.cc' save 'ident.cc'
glyph-block-import NotGlyphFn : notGlyph glyph-block-import NotGlyphFn : notGlyph
notGlyph null 'equal.fc' nothing nothing nothing (Width * 0.5) 'equal.fc.neg'
notGlyph null 'equal.fc' nothing nothing nothing (Width * 1.0) 'equal.fc.neg3' define [slash t b l r sw sh] : dispiro
notGlyph null 'equal.fc' nothing nothing nothing (Width * 1.5) 'equal.fc.neg4' widths.center OperatorStroke
notGlyph null 'ident.fc' nothing nothing nothing (Width * 0.5) 'ident.fc.neg' flat (sh + l) b
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.0) 'ident.fc.neg3' curl (sh + r) t
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.5) 'ident.fc.neg4'
define [exSlash2 t b l r sw sh] : begin
local dr : PeriodRadius / Stroke * OperatorStroke
union
DotAt (sh + l + dr * (r - l) / (t - b)) (b + dr) dr
intersection
Rect (symbolMid + t) [Math.min (b + dr * 3.5) (symbolMid - EqualHalfSpace)] (-Width * 4) (Width * 4)
dispiro
widths.center OperatorStroke
flat (sh + l) b
curl (sh + r) t
notGlyph.generic 'equal.fc.neg' null 'equal.fc' (shift -- (Width * 0.5)) (F -- slash)
notGlyph.generic 'equal.fc.neg3' null 'equal.fc' (shift -- (Width * 1.0)) (F -- slash)
notGlyph.generic 'equal.fc.neg4' null 'equal.fc' (shift -- (Width * 1.5)) (F -- slash)
notGlyph.generic 'ident.fc.neg' null 'ident.fc' (shift -- (Width * 0.5)) (F -- slash)
notGlyph.generic 'ident.fc.neg3' null 'ident.fc' (shift -- (Width * 1.0)) (F -- slash)
notGlyph.generic 'ident.fc.neg4' null 'ident.fc' (shift -- (Width * 1.5)) (F -- slash)
notGlyph.generic 'equal.fc.neg-alt-1' null 'equal.fc' (shift -- (Width * 0.5)) (F -- exSlash2)
notGlyph.generic 'equal.fc.neg3-alt-1' null 'equal.fc' (shift -- (Width * 1.0)) (F -- exSlash2)
notGlyph.generic 'equal.fc.neg4-alt-1' null 'equal.fc' (shift -- (Width * 1.5)) (F -- exSlash2)
do "<| , |> and <>" do "<| , |> and <>"
glyph-block-import Symbol-Math-Relation : LessShape GreaterShape glyph-block-import Symbol-Math-Relation : LessShape GreaterShape

View file

@ -747,8 +747,7 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
bar ~> look-around bar ~> look-around
# == and !=, and other related # == and !=, and other related
do "equals" : begin do "equals" : CreateLigationLookup : list
CreateLigationLookup : list
# Disable regular expression lookaheads # Disable regular expression lookaheads
chain-rule chain-rule
{'parenLeft'} ~> look-around {'parenLeft'} ~> look-around
@ -773,6 +772,11 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
{'equal.cf' 'equal.jf'} ~> look-around {'equal.cf' 'equal.jf'} ~> look-around
equal ~> {'equal.jf'} equal ~> {'equal.jf'}
piecewise piecewise
[hasLG 'exeq-alt-1'] : chain-rule
exclam ~> {'equal.fc.neg4-alt-1'}
equal ~> {'equal.cc'}
equal ~> {'equal.cc'}
equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'equal.fc.neg4'} exclam ~> {'equal.fc.neg4'}
equal ~> {'equal.cc'} equal ~> {'equal.cc'}
@ -793,14 +797,19 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
equal ~> {'ident.fc.neg3'} equal ~> {'ident.fc.neg3'}
exclam ~> {'ident.cc'} exclam ~> {'ident.cc'}
equal ~> {'ident.cf'} equal ~> {'ident.cf'}
[hasLG 'eqslasheq'] : chain-rule [hasLG 'exeq-alt-1'] : chain-rule
equal ~> {'ident.fc.neg3'} exclam ~> {'equal.fc.neg3-alt-1'}
slash ~> {'ident.cc'} equal ~> {'equal.cc'}
equal ~> {'ident.cf'} equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'equal.fc.neg3'} exclam ~> {'equal.fc.neg3'}
equal ~> {'equal.cc'} equal ~> {'equal.cc'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
piecewise
[hasLG 'eqslasheq'] : chain-rule
equal ~> {'ident.fc.neg3'}
slash ~> {'ident.cc'}
equal ~> {'ident.cf'}
[hasLG 'slasheq'] : chain-rule [hasLG 'slasheq'] : chain-rule
equal ~> {'equal.fc.neg3'} equal ~> {'equal.fc.neg3'}
slash ~> {'equal.cc'} slash ~> {'equal.cc'}
@ -814,9 +823,14 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
[hasLG 'tildeeq'] : chain-rule [hasLG 'tildeeq'] : chain-rule
anyWave ~> [just 'equal.fc.neg'] anyWave ~> [just 'equal.fc.neg']
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
piecewise
[hasLG 'slasheq'] : chain-rule [hasLG 'slasheq'] : chain-rule
slash ~> {'equal.fc.neg'} slash ~> {'equal.fc.neg'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}
piecewise
[hasLG 'exeq-alt-1'] : chain-rule
exclam ~> {'equal.fc.neg-alt-1'}
equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule [hasLG 'exeq'] : chain-rule
exclam ~> {'equal.fc.neg'} exclam ~> {'equal.fc.neg'}
equal ~> {'equal.cf'} equal ~> {'equal.cf'}

View file

@ -12,15 +12,26 @@ module.exports = function formVariantData(data, para) {
for (const gr in data.composite) { for (const gr in data.composite) {
const comp = data.composite[gr]; const comp = data.composite[gr];
if (!comp.tag) continue; if (!comp.tag) continue;
const ligSets = createBuildup(data.simple, comp.buildup);
if (comp.isOptOut) { if (comp.isOptOut) {
optOutBuildup[comp.tag] = comp.buildup; optOutBuildup[comp.tag] = ligSets;
} else { } else {
optInBuildup[comp.tag] = comp.buildup; optInBuildup[comp.tag] = ligSets;
} }
if (!comp.isOptOut) { if (!comp.isOptOut) {
hives[gr] = { caltBuildup: [...comp.buildup] }; hives[gr] = { caltBuildup: ligSets };
} }
} }
return { defaultBuildup: { ...optInBuildup, ...optOutBuildup }, hives }; return { defaultBuildup: { ...optInBuildup, ...optOutBuildup }, hives };
}; };
function createBuildup(simple, buildup) {
let ligSet = new Set();
for (const s of buildup) {
if (!simple[s]) throw new Error("Cannot find simple ligation group " + s);
ligSet.add(simple[s].ligGroup);
}
return Array.from(ligSet);
}

View file

@ -38,6 +38,10 @@ desc = 'Enable special triple-line ligation for `=!=` only'
ligGroup = "exeq" ligGroup = "exeq"
desc = 'Enable ligation for `!=` and `!==`' desc = 'Enable ligation for `!=` and `!==`'
[simple.calt-exeq-alt-1]
ligGroup = "exeq-alt-1"
desc = 'Enable ligation for `!=` and `!==` with a dot at below for distinction'
[simple.calt-tildeeq] [simple.calt-tildeeq]
ligGroup = "tildeeq" ligGroup = "tildeeq"
desc = 'Enable ligation for `~=` as inequality' desc = 'Enable ligation for `~=` as inequality'
@ -101,77 +105,77 @@ desc = 'Enable ligation for `<!--` and `<!---`'
[composite.ligset-calt] [composite.ligset-calt]
isOptOut = true # This feature is on by default by many software isOptOut = true # This feature is on by default by many software
tag = 'calt' tag = 'calt'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeq', 'ineq', 'exeq', 'plusplus', 'kern-dotty'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeq', 'calt-ineq', 'calt-exeq', 'calt-plusplus', 'calt-kern-dotty']
brief = 'Default' brief = 'Default'
desc = 'Default setting in text editors' desc = 'Default setting in text editors'
[composite.ligset-dlig] [composite.ligset-dlig]
tag = 'dlig' tag = 'dlig'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'arrow2', 'llgg', 'eqeq', 'ineq', 'exeq', 'ltgt-diamond', 'plusplus', 'kern-dotty', 'dotoper', 'logic', 'brst'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-arrow2', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-exeq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-kern-dotty', 'calt-dotoper', 'calt-logic', 'calt-brst']
brief = 'Discretionary' brief = 'Discretionary'
desc = 'Discretionary ligatures' desc = 'Discretionary ligatures'
[composite.ligset-clike] [composite.ligset-clike]
tag = 'CLIK' tag = 'CLIK'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'ineq', 'exeqeq', 'exeq', 'plusplus', 'kern-dotty'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-ineq', 'calt-exeqeq', 'calt-exeq', 'calt-plusplus', 'calt-kern-dotty']
desc = 'C-Like' desc = 'C-Like'
[composite.ligset-javascript] [composite.ligset-javascript]
tag = 'JSPT' tag = 'JSPT'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'ineq', 'exeqeq', 'exeq', 'plusplus', 'kern-dotty'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-ineq', 'calt-exeqeq', 'calt-exeq', 'calt-plusplus', 'calt-kern-dotty']
desc = 'JavaScript' desc = 'JavaScript'
[composite.ligset-php] [composite.ligset-php]
tag = 'PHPX' tag = 'PHPX'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'llggeq', 'eqeqeq', 'eqeq', 'ineq', 'exeqeq', 'exeq', 'plusplus', 'kern-dotty'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-llggeq', 'calt-eqeqeq', 'calt-eqeq', 'calt-ineq', 'calt-exeqeq', 'calt-exeq', 'calt-plusplus', 'calt-kern-dotty']
desc = 'PHP' desc = 'PHP'
[composite.ligset-ml] [composite.ligset-ml]
tag = 'MLXX' tag = 'MLXX'
buildup = ['center-ops', 'arrow', 'trig', 'eqeq', 'ineq', 'ltgt-ne', 'brst', 'plusplus', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeq', 'calt-ineq', 'calt-ltgt-ne', 'calt-brst', 'calt-plusplus', 'calt-logic']
desc = 'ML' desc = 'ML'
[composite.ligset-fsharp] [composite.ligset-fsharp]
tag = 'FSHP' tag = 'FSHP'
buildup = ['center-ops', 'arrow', 'trig', 'eqeq', 'ineq', 'ltgt-ne', 'brst', 'plusplus', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeq', 'calt-ineq', 'calt-ltgt-ne', 'calt-brst', 'calt-plusplus', 'calt-logic']
desc = 'F#' desc = 'F#'
[composite.ligset-fstar] [composite.ligset-fstar]
tag = 'FSTA' tag = 'FSTA'
buildup = ['center-ops', 'arrow', 'trig', 'eqeqeq', 'ineq', 'eqexeq', 'brst', 'plusplus', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-trig', 'calt-eqeqeq', 'calt-ineq', 'calt-eqexeq', 'calt-brst', 'calt-plusplus', 'calt-logic']
desc = 'F*' desc = 'F*'
[composite.ligset-haskell] [composite.ligset-haskell]
tag = 'HSKL' tag = 'HSKL'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'slasheq', 'ltgt-diamond', 'plusplus', 'dotoper', 'kern-dotty', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-slasheq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic']
desc = 'Haskell' desc = 'Haskell'
[composite.ligset-idris] [composite.ligset-idris]
tag = 'IDRS' tag = 'IDRS'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'slasheq', 'ltgt-diamond', 'plusplus', 'dotoper', 'kern-dotty', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-slasheq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic']
desc = 'Idris' desc = 'Idris'
[composite.ligset-elm] [composite.ligset-elm]
tag = 'ELMX' tag = 'ELMX'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'slasheq', 'ltgt-diamond', 'plusplus', 'dotoper', 'kern-dotty', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-slasheq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic']
desc = 'Elm' desc = 'Elm'
[composite.ligset-purescript] [composite.ligset-purescript]
tag = 'PURS' tag = 'PURS'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'slasheq', 'ltgt-diamond', 'plusplus', 'dotoper', 'kern-dotty', 'logic'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-slasheq', 'calt-ltgt-diamond', 'calt-plusplus', 'calt-dotoper', 'calt-kern-dotty', 'calt-logic']
desc = 'PureScript' desc = 'PureScript'
[composite.ligset-swift] [composite.ligset-swift]
tag = 'SWFT' tag = 'SWFT'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'exeq', 'ltgt-diamond', 'plusplus'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-exeq', 'calt-ltgt-diamond', 'calt-plusplus']
desc = 'Swift' desc = 'Swift'
[composite.ligset-coq] [composite.ligset-coq]
tag = 'COQX' tag = 'COQX'
buildup = ['center-ops', 'arrow', 'arrow2', 'trig', 'llgg', 'eqeq', 'ineq', 'ltgt-ne', 'plusplus', 'dotoper', 'logic', 'brst'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-arrow2', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-ltgt-ne', 'calt-plusplus', 'calt-dotoper', 'calt-logic', 'calt-brst']
desc = 'Coq' desc = 'Coq'
[composite.ligset-matlab] [composite.ligset-matlab]
tag = 'MTLB' tag = 'MTLB'
buildup = ['center-ops', 'arrow', 'html-comment', 'trig', 'llgg', 'eqeq', 'ineq', 'tildeeq', 'plusplus', 'kern-dotty'] buildup = ['calt-center-ops', 'calt-arrow', 'calt-html-comment', 'calt-trig', 'calt-llgg', 'calt-eqeq', 'calt-ineq', 'calt-tildeeq', 'calt-plusplus', 'calt-kern-dotty']
desc = 'Matlab' desc = 'Matlab'

View file

@ -107,6 +107,48 @@
<div class="sample" style="font-feature-settings:'VXAD'">f</div> <div class="sample" style="font-feature-settings:'VXAD'">f</div>
</li> </li>
</ol></li> </ol></li>
<li>
<div class="desc-group char">
<div class="sample">b</div>
<div class="triangle"></div>
</div>
<ol class="group">
<li class="desc-group char">
<div class="label tag">VXBK</div>
<div class="sample" style="font-feature-settings:'VXBK'">b</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBL</div>
<div class="sample" style="font-feature-settings:'VXBL'">b</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBM</div>
<div class="sample" style="font-feature-settings:'VXBM'">b</div>
</li>
</ol></li>
<li>
<div class="desc-group char">
<div class="sample">d</div>
<div class="triangle"></div>
</div>
<ol class="group">
<li class="desc-group char">
<div class="label tag">VXBN</div>
<div class="sample" style="font-feature-settings:'VXBN'">d</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBO</div>
<div class="sample" style="font-feature-settings:'VXBO'">d</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBP</div>
<div class="sample" style="font-feature-settings:'VXBP'">d</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBQ</div>
<div class="sample" style="font-feature-settings:'VXBQ'">d</div>
</li>
</ol></li>
<li> <li>
<div class="desc-group char"> <div class="desc-group char">
<div class="sample">g</div> <div class="sample">g</div>
@ -196,7 +238,11 @@
</li> </li>
<li class="desc-group char"> <li class="desc-group char">
<div class="label tag">cv70</div> <div class="label tag">cv70</div>
<div class="sample italic" style="font-feature-settings:'cv70'">k</div> <div class="sample" style="font-feature-settings:'cv70'">k</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBR</div>
<div class="sample" style="font-feature-settings:'VXBR'">k</div>
</li> </li>
</ol></li> </ol></li>
<li> <li>
@ -426,6 +472,21 @@
<div class="sample" style="font-feature-settings:'VXAQ'">B</div> <div class="sample" style="font-feature-settings:'VXAQ'">B</div>
</li> </li>
</ol></li> </ol></li>
<li>
<div class="desc-group char">
<div class="sample">D</div>
<div class="triangle"></div>
</div>
<ol class="group">
<li class="desc-group char">
<div class="label tag">VXBG</div>
<div class="sample" style="font-feature-settings:'VXBG'">D</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBH</div>
<div class="sample" style="font-feature-settings:'VXBH'">D</div>
</li>
</ol></li>
<li> <li>
<div class="desc-group char"> <div class="desc-group char">
<div class="sample">G</div> <div class="sample">G</div>
@ -810,6 +871,14 @@
<div class="label tag">cv45</div> <div class="label tag">cv45</div>
<div class="sample" style="font-feature-settings:'cv45'">#</div> <div class="sample" style="font-feature-settings:'cv45'">#</div>
</li> </li>
<li class="desc-group char">
<div class="label tag">VXBI</div>
<div class="sample" style="font-feature-settings:'VXBI'">#</div>
</li>
<li class="desc-group char">
<div class="label tag">VXBJ</div>
<div class="sample" style="font-feature-settings:'VXBJ'">#</div>
</li>
</ol></li> </ol></li>
<li> <li>
<div class="desc-group char"> <div class="desc-group char">

View file

@ -242,7 +242,7 @@ module.exports = async function getLigationData() {
function buildLigationSet(ligData, getKey) { function buildLigationSet(ligData, getKey) {
const ligationSets = new Map([ const ligationSets = new Map([
["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", buildup: [] }] ["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", ligSets: [] }]
]); ]);
for (const sel in ligData.composite) { for (const sel in ligData.composite) {
const comp = ligData.composite[sel]; const comp = ligData.composite[sel];
@ -250,9 +250,13 @@ function buildLigationSet(ligData, getKey) {
const key = getKey(comp); const key = getKey(comp);
let item = ligationSets.get(key); let item = ligationSets.get(key);
if (!item) { if (!item) {
let ligSets = new Set();
for (const s of comp.buildup) {
ligSets.add(ligData.simple[s].ligGroup);
}
item = { item = {
tag: comp.tag, tag: comp.tag,
buildup: comp.buildup, ligSets: [...ligSets],
tagName: comp.tag, tagName: comp.tag,
desc: comp.desc, desc: comp.desc,
brief: comp.brief || comp.desc brief: comp.brief || comp.desc

View file

@ -3,7 +3,7 @@
<thead><tr class="first"><th>Feature Tag</th><th>Description</th></tr></thead> <thead><tr class="first"><th>Feature Tag</th><th>Description</th></tr></thead>
<tbody> <tbody>
<%_ for(const group of ligation.sets) { _%> <%_ for(const group of ligation.sets) { _%>
<%_ const tagSet = new Set(group.buildup); _%> <%_ const tagSet = new Set(group.ligSets); _%>
<%_ const featureSettings = group.tag === 'calt' ? `style="font-feature-settings:'${group.tag}' ${group.switch||'on'}"` : `style="font-feature-settings: 'calt' off, '${group.tag}' ${group.switch||'on'}"` _%> <%_ const featureSettings = group.tag === 'calt' ? `style="font-feature-settings:'${group.tag}' ${group.switch||'on'}"` : `style="font-feature-settings: 'calt' off, '${group.tag}' ${group.switch||'on'}"` _%>
<tr class="note"> <tr class="note">
<td><%= group.tagName || group.tag %><%= group.switch ? ' ' + group.switch : ''%></td> <td><%= group.tagName || group.tag %><%= group.switch ? ' ' + group.switch : ''%></td>