dtls-3.html (5648B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel="match" href="dtls-3-ref.html"/> 4 <style type="text/css" media="screen, print"> 5 @font-face { 6 font-family: "dtls-1"; 7 src: url(dtls-1.otf); 8 } 9 </style> 10 </head> 11 <body> 12 13 <math> 14 <mstyle style="font-family: 'dtls-1';"> 15 <mover accent="true" id="mover0"> 16 <mo mathvariant="fraktur">a</mo> 17 </mover> 18 </mstyle> 19 </math> 20 21 <p> 22 23 <math> 24 <mstyle style="font-family: 'dtls-1';"> 25 <mover accent="true"> 26 <mo mathvariant="fraktur">a</mo> 27 <mo mathvariant="fraktur" id="mo0"></mo> 28 </mover> 29 </mstyle> 30 </math> 31 32 <p> 33 34 <math> 35 <mstyle style="font-family: 'dtls-1';"> 36 <mover accent="true"> 37 <mo mathvariant="fraktur">a</mo> 38 <mo mathvariant="fraktur" id="mo1">a</mo> 39 </mover> 40 </mstyle> 41 </math> 42 43 <p> 44 45 <math> 46 <mstyle style="font-family: 'dtls-1';" id="mstyle0"> 47 </mstyle> 48 </math> 49 50 <p> 51 52 <math> 53 <mstyle id="mstyle1"> 54 <mover accent="true"> 55 <mover accent="true"> 56 <mn mathvariant="fraktur">a</mn> 57 <mn mathvariant="fraktur">a</mn> 58 </mover> 59 <mover accent="true"> 60 <mn mathvariant="fraktur">a</mn> 61 <mn mathvariant="fraktur">a</mn> 62 </mover> 63 </mover> 64 </mstyle> 65 </math> 66 67 <p> 68 69 <math> 70 <mstyle style="font-family: 'dtls-1';"> 71 <mover accent="true"> 72 <mrow> 73 <mrow> 74 <mrow id="mrow0"> 75 </mrow> 76 </mrow> 77 </mrow> 78 <mo mathvariant="fraktur">a</mo> 79 </mover> 80 </mstyle> 81 </math> 82 83 <p> 84 85 <math> 86 <mstyle id="mstyle4" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0"> 87 <mover accent="true"> 88 <mover accent="true"> 89 <mo mathvariant="fraktur">a</mo> 90 <mo mathvariant="fraktur">a</mo> 91 </mover> 92 <mover accent="true"> 93 <mo mathvariant="fraktur">a</mo> 94 <mo mathvariant="fraktur">a</mo> 95 </mover> 96 </mover> 97 </mstyle> 98 </math> 99 100 <p> 101 102 <math> 103 <mstyle id="mstyle5" style ="font-family: 'dtls-1';"> 104 <mover accent="true"> 105 <mover accent="true"> 106 <mo mathvariant="fraktur">a</mo> 107 <mo mathvariant="fraktur">a</mo> 108 </mover> 109 <mover accent="true"> 110 <mo mathvariant="fraktur">a</mo> 111 <mo mathvariant="fraktur">a</mo> 112 </mover> 113 </mover> 114 </mstyle> 115 </math> 116 117 <p> 118 119 <math> 120 <mstyle style="font-family: 'dtls-1';"> 121 <mover id="mover1"> 122 <mo mathvariant="fraktur">a</mo> 123 <mo mathvariant="fraktur">a</mo> 124 </mover> 125 </mstyle> 126 </math> 127 128 <p> 129 130 <math> 131 <mstyle style="font-family: 'dtls-1';"> 132 <mover accent="true" id="mover2"> 133 <mo mathvariant="fraktur">a</mo> 134 <mo mathvariant="fraktur">a</mo> 135 </mover> 136 </mstyle> 137 </math> 138 139 <p> 140 141 <math> 142 <mstyle style="font-family: 'dtls-1';"> 143 <mover accent="true" id="mover3"> 144 <mo mathvariant="fraktur">a</mo> 145 <mo mathvariant="fraktur">a</mo> 146 </mover> 147 </mstyle> 148 </math> 149 150 <p> 151 152 <math> 153 <mstyle style="font-family: 'dtls-1';"> 154 <mover accent="true"> 155 <mo id="mo2">a</mo> 156 <mo>a</mo> 157 </mover> 158 </mstyle> 159 </math> 160 161 <p> 162 163 <math> 164 <mstyle style="font-family: 'dtls-1';"> 165 <mover accent="true"> 166 <mo mathvariant="fraktur" id="mo3">a</mo> 167 <mo>a</mo> 168 </mover> 169 </mstyle> 170 </math> 171 172 <script> 173 function doTest() 174 { 175 var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); 176 mo.innerHTML = "a"; 177 mo.setAttribute("mathvariant", "fraktur"); 178 // An added child gets dtls font feature 179 document.getElementById("mover0").appendChild(mo); 180 // A child with changed text gets dtls font feature 181 document.getElementById("mo0").innerHTML = "a"; 182 // A relocated child loses dtls font feature setting 183 document.getElementById("mstyle0").appendChild(document.getElementById("mo1")); 184 // A change in style 185 document.getElementById("mstyle1").setAttribute("style", "font-family: 'dtls-1';"); 186 187 // dtls gets added to descendants as well 188 var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); 189 mo1.innerHTML = "a"; 190 mo1.setAttribute("mathvariant", "fraktur"); 191 document.getElementById("mrow0").appendChild(mo1); 192 // removing explicit dtls setting works 193 document.getElementById("mstyle4").setAttribute( 194 "style", "font-family: 'dtls-1';") 195 // setting an explicit dtls font feature 196 document.getElementById("mstyle5").setAttribute( 197 "style" , "font-family: 'dtls-1'; font-feature-settings: 'dtls' 0"); 198 199 // Adding accent="true" applies dtls font feature 200 document.getElementById("mover1").setAttribute("accent", "true"); 201 // Changing accent="true" to false removes dtls font feature 202 document.getElementById("mover2").setAttribute("accent", "false"); 203 // Removing accent="true" removes dtls font feature 204 document.getElementById("mover3").removeAttribute("accent"); 205 206 // dtls applies when mathvariant is set 207 document.getElementById("mo2").setAttribute("mathvariant", "fraktur"); 208 209 // dtls still applies when mathvariant is removed 210 document.getElementById("mo3").removeAttribute("mathvariant"); 211 212 document.documentElement.removeAttribute("class"); 213 } 214 document.documentElement.addEventListener("TestRendered", doTest); 215 </script> 216 </body> 217 </html>