diff options
Diffstat (limited to 'testing/web-platform/mozilla/tests/mathml/fonts/opentype-axis-height.html')
-rw-r--r-- | testing/web-platform/mozilla/tests/mathml/fonts/opentype-axis-height.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/mathml/fonts/opentype-axis-height.html b/testing/web-platform/mozilla/tests/mathml/fonts/opentype-axis-height.html new file mode 100644 index 0000000000..8a7050ad4b --- /dev/null +++ b/testing/web-platform/mozilla/tests/mathml/fonts/opentype-axis-height.html @@ -0,0 +1,51 @@ +<!doctype html> +<html> + <head> + <title>Open Type MATH - axis-height</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365"/> + <meta charset="utf-8"/> + <style type="text/css"> + math { + font-size: 10px; + } + @font-face { + font-family: axis-height-1; + src: url(axis-height-1.otf); + } + @font-face { + font-family: axis-height-2; + src: url(axis-height-2.otf); + } + </style> + <script type="application/javascript"> + setup({explicit_done : true}); + + var epsilon = 5; + + function getBox(aId) { + return document.getElementById(aId).getBoundingClientRect(); + } + + function doTest() { + test(function() { + assert_approx_equals(getBox("plus1").top - getBox("plus2").top, 10 * 20, epsilon); + }, "AxisHeight"); + done(); + } + </script> + </head> + <body onload="doTest()"> + + <p> + <math style="font-family: axis-height-1;"> + <mo id="plus1">+</mo> + </math> + <math style="font-family: axis-height-2;"> + <mo id="plus2">+</mo> + </math> + </p> + + </body> +</html> |