Disables glyph composition feature for enclosing+base (only permits order base+enclosing). Closes #335

This commit is contained in:
Rasmus Andersson 2021-03-29 17:09:05 -07:00
parent 240270c837
commit 9b8f3f1b5a
4 changed files with 40 additions and 125 deletions

View file

@ -198,6 +198,7 @@ if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
<div class="checkbox-group"> <div class="checkbox-group">
<span>Default-on features:</span> <span>Default-on features:</span>
<label title="Contextual alternates"><input type="checkbox" class="featopt" name="feat:calt=0"> Disable calt &nbsp;(Contextual alternates)</label> <label title="Contextual alternates"><input type="checkbox" class="featopt" name="feat:calt=0"> Disable calt &nbsp;(Contextual alternates)</label>
<label title="Glyph Composition/Decomposition"><input type="checkbox" class="featopt" name="feat:ccmp=0"> Disable ccmp</label>
<label title="Kerning"><input type="checkbox" class="featopt" name="feat:kern=0"> Disable kern &nbsp;(Kerning)</label> <label title="Kerning"><input type="checkbox" class="featopt" name="feat:kern=0"> Disable kern &nbsp;(Kerning)</label>
</div> </div>

View file

@ -258,7 +258,7 @@ input[type="checkbox"]::after {
height:var(--checkbox-handle-size); height:var(--checkbox-handle-size);
border-radius:var(--checkbox-handle-size); border-radius:var(--checkbox-handle-size);
transform: translate(0, 0); transform: translate(0, 0);
transition: all 168ms ease-out; /*cubic-bezier(0.09, 0.49, 0.71, 0.98);*/ transition: all 90ms ease-out; /*cubic-bezier(0.09, 0.49, 0.71, 0.98);*/
} }
input[type="checkbox"][checked] { input[type="checkbox"][checked] {
background-color: var(--checkbox-on-bg); background-color: var(--checkbox-on-bg);

View file

@ -173,7 +173,7 @@ samples.set('Feature: ccmp', `
/i <modifier> --> /idotless ==> i\u0300 /i <modifier> --> /idotless ==> i\u0300
/idotless /gravecomb --> /igrave ==> \u0131\u0300 /idotless /gravecomb --> /igrave ==> \u0131\u0300
Enclosing glyphs (glyph + {U+20DD,U+20DE}) Enclosing glyphs (base + {U+20DD,U+20DE})
U+20DD COMBINING ENCLOSING CIRCLE: U+20DD COMBINING ENCLOSING CIRCLE:
U+20DE COMBINING ENCLOSING SQUARE: U+20DE COMBINING ENCLOSING SQUARE:
@ -204,6 +204,15 @@ U\u20DE V\u20DE W\u20DE X\u20DE Y\u20DE Z\u20DE !\u20DE ?\u
\u20DE \u20DE \u20DE \u20DE \u20DE \u20DE \u20DE \u20DE
HE\u20DDLLO WO\u20DERLD HE\u20DDLLO WO\u20DERLD
The following should NOT compose but instead replace U+20DD or U+20DE with largeCircle or whiteLargeSquare: (They are in the wrong order: {U+20DD,U+20DE} + base. This was fixed in version 3.18.)
\u20DDA \u20DDB \u20DDC \u20DD1 \u20DD2 \u20DD3
\u20DEA \u20DEB \u20DEC \u20DE1 \u20DE2 \u20DE3
;\u20DDELLO ;\u20DEORLD
`) `)

View file

@ -560,7 +560,7 @@ lookup ccmp03 {
} ccmp03; } ccmp03;
# * enclosingsquarecomb -> composite # * enclosingsquarecomb -> composite
sub A enclosingsquarecomb by A.squared; sub A' enclosingsquarecomb' by A.squared;
sub B enclosingsquarecomb by B.squared; sub B enclosingsquarecomb by B.squared;
sub C enclosingsquarecomb by C.squared; sub C enclosingsquarecomb by C.squared;
sub D enclosingsquarecomb by D.squared; sub D enclosingsquarecomb by D.squared;
@ -620,69 +620,8 @@ sub rightArrow enclosingsquarecomb by rightArrow.squared;
sub dngb_check enclosingsquarecomb by dngb_check.squared; sub dngb_check enclosingsquarecomb by dngb_check.squared;
sub dngb_ballotx enclosingsquarecomb by dngb_ballotx.squared; sub dngb_ballotx enclosingsquarecomb by dngb_ballotx.squared;
# enclosingsquarecomb * -> composite
sub enclosingsquarecomb A by A.squared;
sub enclosingsquarecomb B by B.squared;
sub enclosingsquarecomb C by C.squared;
sub enclosingsquarecomb D by D.squared;
sub enclosingsquarecomb E by E.squared;
sub enclosingsquarecomb F by F.squared;
sub enclosingsquarecomb G by G.squared;
sub enclosingsquarecomb H by H.squared;
sub enclosingsquarecomb I by I.squared;
sub enclosingsquarecomb J by J.squared;
sub enclosingsquarecomb K by K.squared;
sub enclosingsquarecomb L by L.squared;
sub enclosingsquarecomb M by M.squared;
sub enclosingsquarecomb N by N.squared;
sub enclosingsquarecomb O by O.squared;
sub enclosingsquarecomb P by P.squared;
sub enclosingsquarecomb Q by Q.squared;
sub enclosingsquarecomb R by R.squared;
sub enclosingsquarecomb S by S.squared;
sub enclosingsquarecomb T by T.squared;
sub enclosingsquarecomb U by U.squared;
sub enclosingsquarecomb V by V.squared;
sub enclosingsquarecomb W by W.squared;
sub enclosingsquarecomb X by X.squared;
sub enclosingsquarecomb Y by Y.squared;
sub enclosingsquarecomb Z by Z.squared;
sub enclosingsquarecomb zero by zero.squared;
sub enclosingsquarecomb one by one.squared;
sub enclosingsquarecomb two by two.squared;
sub enclosingsquarecomb three by three.squared;
sub enclosingsquarecomb four by four.squared;
sub enclosingsquarecomb five by five.squared;
sub enclosingsquarecomb six by six.squared;
sub enclosingsquarecomb seven by seven.squared;
sub enclosingsquarecomb eight by eight.squared;
sub enclosingsquarecomb nine by nine.squared;
sub enclosingsquarecomb zero.slash by zero.slash.squared;
sub enclosingsquarecomb one.ss01 by one.ss01.squared;
sub enclosingsquarecomb three.1 by three.1.squared;
sub enclosingsquarecomb four.ss01 by four.ss01.squared;
sub enclosingsquarecomb six.ss01 by six.ss01.squared;
sub enclosingsquarecomb nine.ss01 by nine.ss01.squared;
sub enclosingsquarecomb exclam by exclam.squared;
sub enclosingsquarecomb question by question.squared;
sub enclosingsquarecomb numbersign by numbersign.squared;
sub enclosingsquarecomb hyphen by hyphen.squared;
sub enclosingsquarecomb less by less.squared;
sub enclosingsquarecomb greater by greater.squared;
sub enclosingsquarecomb equal by equal.squared;
sub enclosingsquarecomb plus by plus.squared;
sub enclosingsquarecomb minus by minus.squared;
sub enclosingsquarecomb multiply by multiply.squared;
sub enclosingsquarecomb divide by divide.squared;
sub enclosingsquarecomb upArrow by upArrow.squared;
sub enclosingsquarecomb downArrow by downArrow.squared;
sub enclosingsquarecomb leftArrow by leftArrow.squared;
sub enclosingsquarecomb rightArrow by rightArrow.squared;
sub enclosingsquarecomb dngb_check by dngb_check.squared;
sub enclosingsquarecomb dngb_ballotx by dngb_ballotx.squared;
# * enclosingcirclecomb -> composite # * enclosingcirclecomb -> composite
sub A enclosingcirclecomb by A.circled; sub A' enclosingcirclecomb' by A.circled;
sub B enclosingcirclecomb by B.circled; sub B enclosingcirclecomb by B.circled;
sub C enclosingcirclecomb by C.circled; sub C enclosingcirclecomb by C.circled;
sub D enclosingcirclecomb by D.circled; sub D enclosingcirclecomb by D.circled;
@ -742,63 +681,29 @@ sub rightArrow enclosingcirclecomb by rightArrow.circled;
sub dngb_check enclosingcirclecomb by dngb_check.circled; sub dngb_check enclosingcirclecomb by dngb_check.circled;
sub dngb_ballotx enclosingcirclecomb by dngb_ballotx.circled; sub dngb_ballotx enclosingcirclecomb by dngb_ballotx.circled;
# enclosingcirclecomb * -> composite # enclosingsquarecomb * -> "hey you got the wrong order"
sub enclosingcirclecomb A by A.circled; # See https://github.com/rsms/inter/issues/335
sub enclosingcirclecomb B by B.circled; @ENCLOSED_BASE = [
sub enclosingcirclecomb C by C.circled; A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
sub enclosingcirclecomb D by D.circled; zero one two three four five six seven eight nine
sub enclosingcirclecomb E by E.circled; zero.slash one.ss01 three.1 four.ss01 six.ss01 nine.ss01
sub enclosingcirclecomb F by F.circled; exclam
sub enclosingcirclecomb G by G.circled; question
sub enclosingcirclecomb H by H.circled; numbersign
sub enclosingcirclecomb I by I.circled; hyphen
sub enclosingcirclecomb J by J.circled; less
sub enclosingcirclecomb K by K.circled; greater
sub enclosingcirclecomb L by L.circled; equal
sub enclosingcirclecomb M by M.circled; plus
sub enclosingcirclecomb N by N.circled; minus
sub enclosingcirclecomb O by O.circled; multiply
sub enclosingcirclecomb P by P.circled; divide
sub enclosingcirclecomb Q by Q.circled; upArrow
sub enclosingcirclecomb R by R.circled; downArrow
sub enclosingcirclecomb S by S.circled; leftArrow
sub enclosingcirclecomb T by T.circled; rightArrow
sub enclosingcirclecomb U by U.circled; dngb_check
sub enclosingcirclecomb V by V.circled; dngb_ballotx
sub enclosingcirclecomb W by W.circled; ];
sub enclosingcirclecomb X by X.circled; sub enclosingsquarecomb' @ENCLOSED_BASE by whiteLargeSquare;
sub enclosingcirclecomb Y by Y.circled; sub enclosingcirclecomb' @ENCLOSED_BASE by largeCircle;
sub enclosingcirclecomb Z by Z.circled;
sub enclosingcirclecomb zero by zero.circled;
sub enclosingcirclecomb one by one.circled;
sub enclosingcirclecomb two by two.circled;
sub enclosingcirclecomb three by three.circled;
sub enclosingcirclecomb four by four.circled;
sub enclosingcirclecomb five by five.circled;
sub enclosingcirclecomb six by six.circled;
sub enclosingcirclecomb seven by seven.circled;
sub enclosingcirclecomb eight by eight.circled;
sub enclosingcirclecomb nine by nine.circled;
sub enclosingcirclecomb zero.slash by zero.slash.circled;
sub enclosingcirclecomb one.ss01 by one.ss01.circled;
sub enclosingcirclecomb three.1 by three.1.circled;
sub enclosingcirclecomb four.ss01 by four.ss01.circled;
sub enclosingcirclecomb six.ss01 by six.ss01.circled;
sub enclosingcirclecomb nine.ss01 by nine.ss01.circled;
sub enclosingcirclecomb exclam by exclam.circled;
sub enclosingcirclecomb question by question.circled;
sub enclosingcirclecomb numbersign by numbersign.circled;
sub enclosingcirclecomb hyphen by hyphen.circled;
sub enclosingcirclecomb less by less.circled;
sub enclosingcirclecomb greater by greater.circled;
sub enclosingcirclecomb equal by equal.circled;
sub enclosingcirclecomb plus by plus.circled;
sub enclosingcirclecomb minus by minus.circled;
sub enclosingcirclecomb multiply by multiply.circled;
sub enclosingcirclecomb divide by divide.circled;
sub enclosingcirclecomb upArrow by upArrow.circled;
sub enclosingcirclecomb downArrow by downArrow.circled;
sub enclosingcirclecomb leftArrow by leftArrow.circled;
sub enclosingcirclecomb rightArrow by rightArrow.circled;
sub enclosingcirclecomb dngb_check by dngb_check.circled;
sub enclosingcirclecomb dngb_ballotx by dngb_ballotx.circled;