|
1 <!doctype html> |
|
2 <html class="reftest-wait"> |
|
3 <head> |
|
4 <title>Dynamic OpenType 'math' script tests</title> |
|
5 <!-- See mathscript-1-ref.html for an explanation of this font --> |
|
6 <style type="text/css" media="screen, print"> |
|
7 @font-face { |
|
8 font-family: "mathssty"; |
|
9 src: url("mathssty.woff"); |
|
10 } |
|
11 </style> |
|
12 </head> |
|
13 <body> |
|
14 |
|
15 <!-- Demonstrate that it has no effect outside MathML --> |
|
16 <div style="font-family: 'mathssty'; |
|
17 -moz-font-feature-settings: 'ssty' " id="div0">A</div> |
|
18 |
|
19 <!-- Demonstrate that it works within MathML --> |
|
20 <math> |
|
21 <mstyle style="font-family: 'mathssty'; -moz-font-feature-settings: 'ssty' 2"> |
|
22 <mo id="mo0">A</mo> |
|
23 </mstyle> |
|
24 </math> |
|
25 |
|
26 <script> |
|
27 function doTest() |
|
28 { |
|
29 // Does nothing to non-MathML |
|
30 document.getElementById("div0").appendChild(document.createTextNode("A")); |
|
31 // Does something to MathML |
|
32 document.getElementById("mo0").appendChild(document.createTextNode("A")); |
|
33 document.documentElement.removeAttribute("class"); |
|
34 } |
|
35 window.addEventListener("MozReftestInvalidate", doTest, false); |
|
36 </script> |
|
37 |
|
38 </body> |
|
39 </html> |