mathscript-1-ref.html (1286B)
1 <!DOCTYPE html> 2 <head> 3 4 <!-- This font only has glyphs defined for 'A', 'B', 'C' and 'D', and is 5 designed purely for testing ssty and OpenType 'math' script 6 functionality 7 The glyphs for 'A' and 'D' are identical, the difference between them is 8 that 'A' supports the ssty font feature. 9 'A' with ssty = 1 maps to 'B' 10 'A' with ssty = 2 maps to 'C' 11 The difference between this font and ssty.woff is that the font feature 12 is contained within the OpenType 'math' script. --> 13 <style type="text/css" media="screen, print"> 14 @font-face { 15 font-family: "mathssty"; 16 src: url("mathssty.woff"); 17 } 18 </style> 19 </head> 20 <body> 21 22 <!-- Demonstrate that it has no effect outside MathML --> 23 <div style="font-family: 'mathssty';">D</div> 24 <div style="font-family: 'mathssty';">D</div> 25 26 <!-- Demonstrate that it works within MathML --> 27 <math> 28 <mstyle style="font-family: 'mathssty';"> 29 <mrow> 30 <mo>D</mo> 31 <mo>B</mo> 32 <mo>C</mo> 33 </mrow> 34 </mstyle> 35 </math> 36 <p> 37 <!-- verify it works for the other elements except mtext --> 38 <math> 39 <mstyle style="font-family: 'mathssty';"> 40 <mi mathvariant="normal">C</mi> 41 <mn>C</mn> 42 <mtext>D</mtext> 43 </mstyle> 44 </math> 45 </body>