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
# italic = ["italic-styles"] # Uncomment this line to set styles for italic 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
@ -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-eqexeq`: Enable special triple-line ligation for `=!=` only.
* `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-eqslasheq`: Enable special triple-line ligation for `=/=` 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-serifed`, `cv84`: `f` with bottom serif (default for Slab Upright).
* `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`:
* `v-g-doublestorey`, `cv11`: Double-storey `g`.
* `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-straight`, `cv98`: `j` without serif.
* Styles for `k`, `K`:
* `v-k-straight`, `cv68`: `k` with standard shape (default for Upright).
* `v-k-curly`, `cv69`: Slightly curly `k`, like Iosevka 2.x.
* `v-k-cursive`, `cv70`: `k` with a cursive loop (default for Italic).
* `v-k-straight`, `cv68`: `k` and `K` with standard shape (default for Upright).
* `v-k-curly`, `cv69`: Slightly curly `k` and `K`, like Iosevka 2.x.
* `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`:
* `v-l-serifed`, `cv07`: Serifed `l` (default for Upright).
* `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`:
* `v-capital-b-standard`, `VXAP`: Standard `B` (default).
* `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`:
* `v-capital-g-tooth`, `cv91`: Toothed G (default).
* `v-capital-g-toothless`, `cv92`: Toothless G.
@ -464,6 +478,8 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `#`:
* `v-numbersign-upright`, `cv44`: Number sign with vertical bars (default).
* `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 `&`:
* `v-ampersand-closed`, `VXAG`: Ampersand (`&`) with a closed contour (default).
* `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).
* Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625).
* 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-import CommonShapes
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]
notGlyph unicode oldid top bot prop (-OperatorStroke * 0.5)
define [notGlyph.left unicode oldid top bot prop shift]
notGlyph unicode oldid top bot prop (OperatorStroke * 0.5)
define [notGlyphGeneric newid unicode oldid top bot prop shift F] : begin
create-glyph (newid || 'not' + oldid) : glyph-construction
if unicode : assign-unicode unicode
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
@ -683,34 +696,34 @@ glyph-block Symbol-Math-Relation : begin
glyph-block-import Overmarks : TildeShape
glyph-block-export dH lessSlantness
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 dH : lessSlantness * (RightSB - SB)
define lessEqDist : Math.max [adviceBlackness 4] (XH * 0.16)
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]
VBar x (symbolMid - equalHalfSpace) (symbolMid + equalHalfSpace) [adviceBlackness 6]
VBar x (symbolMid - EqualHalfSpace) (symbolMid + EqualHalfSpace) [adviceBlackness 6]
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 - equalHalfSpace * 1.5) OperatorStroke
HBar left right (symbolMid - EqualHalfSpace * 1.5) OperatorStroke
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
include : EqualShape SB RightSB
save 'equal' '='
branch
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 (1/6)] (symbolMid + EqualHalfSpace * 2.5) DotRadius
include : DotAt [mix SB RightSB (5/6)] (symbolMid - EqualHalfSpace * 2.5) DotRadius
save 'twodotapproxeq' 0x2252
sketch # colon-equal
@ -732,10 +745,10 @@ glyph-block Symbol-Math-Relation : begin
save 'ident' 0x2261
sketch # iiiident
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 * 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 * 2.25) OperatorStroke
save 'iiiident' 0x2263
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)
# Sym parameters
local approxDist : equalHalfSpace * 1.75
local approxDist : EqualHalfSpace * 1.75
local symMag : (operTop - symbolMid) * 0.17
define [symWave height mul] : TildeShape
ttop -- height + symMag * mul
@ -1074,22 +1087,22 @@ glyph-block Symbol-Math-Relation : begin
save 'symBar' 0x2243
sketch # symBarBar
local sympShift : approxDist + equalHalfSpace * 1.5
local sympShift : approxDist + EqualHalfSpace * 1.5
include [refer-glyph 'sym'] AS_BASE
include : Upright
include : Translate 0 (sympShift / 2)
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
save 'symBarBar' 0x2245
sketch # flipsymBarBar
local sympShift : approxDist + equalHalfSpace * 1.5
local sympShift : approxDist + EqualHalfSpace * 1.5
include [refer-glyph 'flipsym'] AS_BASE
include : Upright
include : Translate 0 (sympShift / 2)
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
save 'flipsymBarBar' 0x224C
@ -1180,37 +1193,37 @@ glyph-block Symbol-Math-Complement : begin
glyph-block Symbol-Math-Negation : begin
glyph-block-import NotGlyphFn : notGlyph
notGlyph 0x2260 'equal'
notGlyph 0x2262 'ident'
notGlyph 0x22AC 'vdash'
notGlyph 0x22AD 'tautology'
notGlyph 0x22AE 'forces'
notGlyph 0x22AF 'doubleForces'
notGlyph.left 0x226E 'less'
notGlyph.right 0x226F 'greater'
notGlyph.left 0x2280 'precedes'
notGlyph.right 0x2281 'succeeds'
notGlyph 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 0x2247 'symBarBar'
notGlyph 0x2249 'approx' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75]
notGlyph.left 0x2284 'subst'
notGlyph.right 0x2285 'supst'
notGlyph.left 0x2288 'substBar'
notGlyph.right 0x2289 'supstBar'
notGlyph.left 0x22E2 'prefixBar'
notGlyph.right 0x22E3 'suffixBar'
notGlyph.left 0x2209 'element'
notGlyph.right 0x220C 'turnelement'
notGlyph.left 0x2270 'lesseq'
notGlyph.right 0x2271 'greatereq'
notGlyph.left 0x2274 'lesssym'
notGlyph.right 0x2275 'greatersym'
notGlyph.left 0x22E0 'precedeseqslant'
notGlyph.right 0x22E1 'succeedseqslant'
notGlyph 0x2278 'lessgreater'
notGlyph 0x2279 'greaterless'
notGlyph.right 0x2204 'exists' (CAP - Descender / 2) (Descender / 2) 0.4
notGlyph null 0x2260 'equal'
notGlyph null 0x2262 'ident'
notGlyph null 0x22AC 'vdash'
notGlyph null 0x22AD 'tautology'
notGlyph null 0x22AE 'forces'
notGlyph null 0x22AF 'doubleForces'
notGlyph.left null 0x226E 'less'
notGlyph.right null 0x226F 'greater'
notGlyph.left null 0x2280 'precedes'
notGlyph.right null 0x2281 'succeeds'
notGlyph null 0x2241 'sym' [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 null 0x2247 'symBarBar'
notGlyph null 0x2249 'approx' [mix symbolMid bgopTop 0.75] [mix symbolMid bgopBot 0.75]
notGlyph.left null 0x2284 'subst'
notGlyph.right null 0x2285 'supst'
notGlyph.left null 0x2288 'substBar'
notGlyph.right null 0x2289 'supstBar'
notGlyph.left null 0x22E2 'prefixBar'
notGlyph.right null 0x22E3 'suffixBar'
notGlyph.left null 0x2209 'element'
notGlyph.right null 0x220C 'turnelement'
notGlyph.left null 0x2270 'lesseq'
notGlyph.right null 0x2271 'greatereq'
notGlyph.left null 0x2274 'lesssym'
notGlyph.right null 0x2275 'greatersym'
notGlyph.left null 0x22E0 'precedeseqslant'
notGlyph.right null 0x22E1 'succeedseqslant'
notGlyph null 0x2278 'lessgreater'
notGlyph null 0x2279 'greaterless'
notGlyph.right null 0x2204 'exists' (CAP - Descender / 2) (Descender / 2) 0.4
glyph-block Symbol-Math-Large-Operators : for-width-kinds WideWidth1
glyph-block-import CommonShapes
@ -1452,8 +1465,8 @@ glyph-block Symbol-Math-Other : begin
alias 'mathbullet' 0x2219 'bullet'
alias 'mathbar' 0x2223 'bar'
notGlyph 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 0x2224 'mathbar' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0.1
notGlyph null 0x2226 'parallel' [mix symbolMid bgopTop 0.5] [mix symbolMid bgopBot 0.5] 0
alias 'mathsmallcircle' 0x2218 'smallwhitecircle.NWID'
alias 'whiteDiamondOperator' 0x22C4 'whitediamond.NWID'
alias 'mathstar' 0x22C6 'blackstar.NWID'

View file

@ -1513,7 +1513,7 @@ glyph-block Symbol-Other-Ligation : begin
save 'greater.lig.hole.shiftN1'
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)
sketch # equal.fc
include : difference
@ -1567,12 +1567,33 @@ glyph-block Symbol-Other-Ligation : begin
save 'ident.cc'
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'
notGlyph null 'equal.fc' nothing nothing nothing (Width * 1.5) 'equal.fc.neg4'
notGlyph null 'ident.fc' nothing nothing nothing (Width * 0.5) 'ident.fc.neg'
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.0) 'ident.fc.neg3'
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.5) 'ident.fc.neg4'
define [slash t b l r sw sh] : dispiro
widths.center OperatorStroke
flat (sh + l) b
curl (sh + r) t
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 <>"
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
# == and !=, and other related
do "equals" : begin
CreateLigationLookup : list
do "equals" : CreateLigationLookup : list
# Disable regular expression lookaheads
chain-rule
{'parenLeft'} ~> look-around
@ -773,6 +772,11 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
{'equal.cf' 'equal.jf'} ~> look-around
equal ~> {'equal.jf'}
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
exclam ~> {'equal.fc.neg4'}
equal ~> {'equal.cc'}
@ -793,14 +797,19 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
equal ~> {'ident.fc.neg3'}
exclam ~> {'ident.cc'}
equal ~> {'ident.cf'}
[hasLG 'eqslasheq'] : chain-rule
equal ~> {'ident.fc.neg3'}
slash ~> {'ident.cc'}
equal ~> {'ident.cf'}
[hasLG 'exeq-alt-1'] : chain-rule
exclam ~> {'equal.fc.neg3-alt-1'}
equal ~> {'equal.cc'}
equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule
exclam ~> {'equal.fc.neg3'}
equal ~> {'equal.cc'}
equal ~> {'equal.cf'}
piecewise
[hasLG 'eqslasheq'] : chain-rule
equal ~> {'ident.fc.neg3'}
slash ~> {'ident.cc'}
equal ~> {'ident.cf'}
[hasLG 'slasheq'] : chain-rule
equal ~> {'equal.fc.neg3'}
slash ~> {'equal.cc'}
@ -814,9 +823,14 @@ define [buildLigationsImpl sink para glyphs featureName mappedFeature rankedLook
[hasLG 'tildeeq'] : chain-rule
anyWave ~> [just 'equal.fc.neg']
equal ~> {'equal.cf'}
piecewise
[hasLG 'slasheq'] : chain-rule
slash ~> {'equal.fc.neg'}
equal ~> {'equal.cf'}
piecewise
[hasLG 'exeq-alt-1'] : chain-rule
exclam ~> {'equal.fc.neg-alt-1'}
equal ~> {'equal.cf'}
[hasLG 'exeq'] : chain-rule
exclam ~> {'equal.fc.neg'}
equal ~> {'equal.cf'}

View file

@ -12,15 +12,26 @@ module.exports = function formVariantData(data, para) {
for (const gr in data.composite) {
const comp = data.composite[gr];
if (!comp.tag) continue;
const ligSets = createBuildup(data.simple, comp.buildup);
if (comp.isOptOut) {
optOutBuildup[comp.tag] = comp.buildup;
optOutBuildup[comp.tag] = ligSets;
} else {
optInBuildup[comp.tag] = comp.buildup;
optInBuildup[comp.tag] = ligSets;
}
if (!comp.isOptOut) {
hives[gr] = { caltBuildup: [...comp.buildup] };
hives[gr] = { caltBuildup: ligSets };
}
}
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"
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]
ligGroup = "tildeeq"
desc = 'Enable ligation for `~=` as inequality'
@ -101,77 +105,77 @@ desc = 'Enable ligation for `<!--` and `<!---`'
[composite.ligset-calt]
isOptOut = true # This feature is on by default by many software
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'
desc = 'Default setting in text editors'
[composite.ligset-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'
desc = 'Discretionary ligatures'
[composite.ligset-clike]
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'
[composite.ligset-javascript]
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'
[composite.ligset-php]
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'
[composite.ligset-ml]
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'
[composite.ligset-fsharp]
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#'
[composite.ligset-fstar]
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*'
[composite.ligset-haskell]
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'
[composite.ligset-idris]
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'
[composite.ligset-elm]
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'
[composite.ligset-purescript]
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'
[composite.ligset-swift]
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'
[composite.ligset-coq]
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'
[composite.ligset-matlab]
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'

View file

@ -107,6 +107,48 @@
<div class="sample" style="font-feature-settings:'VXAD'">f</div>
</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>
<div class="desc-group char">
<div class="sample">g</div>
@ -196,7 +238,11 @@
</li>
<li class="desc-group char">
<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>
</ol></li>
<li>
@ -426,6 +472,21 @@
<div class="sample" style="font-feature-settings:'VXAQ'">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">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>
<div class="desc-group char">
<div class="sample">G</div>
@ -810,6 +871,14 @@
<div class="label tag">cv45</div>
<div class="sample" style="font-feature-settings:'cv45'">#</div>
</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>
<li>
<div class="desc-group char">

View file

@ -242,7 +242,7 @@ module.exports = async function getLigationData() {
function buildLigationSet(ligData, getKey) {
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) {
const comp = ligData.composite[sel];
@ -250,9 +250,13 @@ function buildLigationSet(ligData, getKey) {
const key = getKey(comp);
let item = ligationSets.get(key);
if (!item) {
let ligSets = new Set();
for (const s of comp.buildup) {
ligSets.add(ligData.simple[s].ligGroup);
}
item = {
tag: comp.tag,
buildup: comp.buildup,
ligSets: [...ligSets],
tagName: comp.tag,
desc: 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>
<tbody>
<%_ 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'}"` _%>
<tr class="note">
<td><%= group.tagName || group.tag %><%= group.switch ? ' ' + group.switch : ''%></td>