From 31a156ec14f3414e34d3ba53e49dfd5b9db6589a Mon Sep 17 00:00:00 2001 From: be5invis Date: Sat, 21 Nov 2020 13:10:38 -0800 Subject: [PATCH] Add more alternative exclamation-related ligation sets (`exeqeq-alt-1`, `eqexeq-alt-1`, `eqexeq-dl-alt-1`) (#748). --- README.md | 3 +++ changes/4.0.0.md | 1 + font-src/glyphs/symbol/ligation.ptl | 4 ++++ font-src/otl/gsub-ligation.ptl | 12 ++++++++++++ params/ligation-set.toml | 12 ++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 changes/4.0.0.md diff --git a/README.md b/README.md index d016a11d1..4ad935b64 100644 --- a/README.md +++ b/README.md @@ -368,8 +368,11 @@ Subsection `ligations` is used to customize the ligation set assigned to `calt` - `eqeq`: Enable ligation for `==` and `===`. - `ineq`: Enable ligation for `<=` and `>=`. - `exeqeq`: Enable special ligation for `!==` with triple lines. + - `exeqeq-alt-1`: Enable special ligation for `!==` with triple lines, and a dot at below for distinction. - `eqexeq`: Enable special ligation for `=!=` with triple lines. + - `eqexeq-alt-1`: Enable special ligation for `=!=` with triple lines and a dot at below for distinction. - `eqexeq-dl`: Enable special ligation for `=!=` with double lines. + - `eqexeq-dl-alt-1`: Enable special ligation for `=!=` with double lines, and a dot at below for distinction. - `exeq`: Enable ligation for `!=` and `!==`. - `exeq-alt-1`: Enable ligation for `!=` and `!==` with a dot at below for distinction. - `tildeeq`: Enable ligation for `~=` as inequality. diff --git a/changes/4.0.0.md b/changes/4.0.0.md new file mode 100644 index 000000000..d6a814e5c --- /dev/null +++ b/changes/4.0.0.md @@ -0,0 +1 @@ + * Add more alternative exclamation-related ligation sets (`exeqeq-alt-1`, `eqexeq-alt-1`, `eqexeq-dl-alt-1`) (#748). \ No newline at end of file diff --git a/font-src/glyphs/symbol/ligation.ptl b/font-src/glyphs/symbol/ligation.ptl index d6a30b714..88eb669f9 100644 --- a/font-src/glyphs/symbol/ligation.ptl +++ b/font-src/glyphs/symbol/ligation.ptl @@ -255,6 +255,10 @@ glyph-block Symbol-Ligation : begin 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) + notGlyph.generic 'ident.fc.neg-alt-1' null 'ident.fc' (shift -- (Width * 0.5)) (F -- exSlash2) + notGlyph.generic 'ident.fc.neg3-alt-1' null 'ident.fc' (shift -- (Width * 1.0)) (F -- exSlash2) + notGlyph.generic 'ident.fc.neg4-alt-1' null 'ident.fc' (shift -- (Width * 1.5)) (F -- exSlash2) + do "<| , |> and <>" glyph-block-import Symbol-Math-Relation : LessShape GreaterShape diff --git a/font-src/otl/gsub-ligation.ptl b/font-src/otl/gsub-ligation.ptl index d54a8c751..3fd9c45ec 100644 --- a/font-src/otl/gsub-ligation.ptl +++ b/font-src/otl/gsub-ligation.ptl @@ -790,14 +790,26 @@ define [buildLigationsImpl sink para featureName mappedFeature rankedLookups] : equal ~> {'equal.cc'} equal ~> {'equal.cf'} piecewise + [hasLG 'exeqeq-alt-1'] : chain-rule + exclam ~> {'ident.fc.neg3-alt-1'} + equal ~> {'ident.cc'} + equal ~> {'ident.cf'} [hasLG 'exeqeq'] : chain-rule exclam ~> {'ident.fc.neg3'} equal ~> {'ident.cc'} equal ~> {'ident.cf'} + [hasLG 'eqexeq-alt-1'] : chain-rule + equal ~> {'ident.fc.neg3-alt-1'} + exclam ~> {'ident.cc'} + equal ~> {'ident.cf'} [hasLG 'eqexeq'] : chain-rule equal ~> {'ident.fc.neg3'} exclam ~> {'ident.cc'} equal ~> {'ident.cf'} + [hasLG 'eqexeq-dl-alt-1'] : chain-rule + equal ~> {'equal.fc.neg3-alt-1'} + exclam ~> {'equal.cc'} + equal ~> {'equal.cf'} [hasLG 'eqexeq-dl'] : chain-rule equal ~> {'equal.fc.neg3'} exclam ~> {'equal.cc'} diff --git a/params/ligation-set.toml b/params/ligation-set.toml index 079c578c6..0dff8e4d7 100644 --- a/params/ligation-set.toml +++ b/params/ligation-set.toml @@ -30,14 +30,26 @@ desc = 'Enable ligation for `<=` and `>=`' ligGroup = "exeqeq" desc = 'Enable special ligation for `!==` with triple lines' +[simple.exeqeq-alt-1] +ligGroup = "exeqeq-alt-1" +desc = 'Enable special ligation for `!==` with triple lines, and a dot at below for distinction' + [simple.eqexeq] ligGroup = "eqexeq" desc = 'Enable special ligation for `=!=` with triple lines' +[simple.eqexeq-alt-1] +ligGroup = "eqexeq-alt-1" +desc = 'Enable special ligation for `=!=` with triple lines and a dot at below for distinction' + [simple.eqexeq-dl] ligGroup = "eqexeq-dl" desc = 'Enable special ligation for `=!=` with double lines' +[simple.eqexeq-dl-alt-1] +ligGroup = "eqexeq-dl-alt-1" +desc = 'Enable special ligation for `=!=` with double lines, and a dot at below for distinction' + [simple.exeq] ligGroup = "exeq" desc = 'Enable ligation for `!=` and `!==`'