tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

display-operator-min-height-default-font.html (1861B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8" />
      5    <title>DisplayOperatorMinHeight with default font</title>
      6    <link
      7      rel="help"
      8      href="https://w3c.github.io/mathml-core/#layout-of-operators"
      9    >
     10    <meta
     11      name="assert"
     12      content="Operators using largeop should be bigger"
     13    >
     14    <script src="/resources/testharness.js"></script>
     15    <script src="/resources/testharnessreport.js"></script>
     16    <script src="/mathml/support/feature-detection.js"></script>
     17    <script src="/mathml/support/fonts.js"></script>
     18 
     19    <style>
     20      math {
     21        font-size: 16px;
     22      }
     23    </style>
     24 
     25    <script>
     26      // Small factor to ensure that the largeop version is bigger
     27      const delta = 1.2;
     28 
     29      var t = async_test("Operators using largeop should be bigger");
     30      window.addEventListener("load", () => {
     31        loadAllFonts().then(
     32          t.step_func_done(function () {
     33            document.querySelectorAll("math").forEach(
     34              (math, i) => {
     35                children = math.children;
     36                regular = children[0].getBoundingClientRect();
     37                largeop = children[1].getBoundingClientRect();
     38                assert_greater_than(
     39                  largeop.height,
     40                  regular.height * delta,
     41                  `Test ${children[0].textContent}`,
     42                );
     43              },
     44            );
     45          }),
     46        );
     47      });
     48    </script>
     49  </head>
     50 
     51  <body>
     52    <div id="log"></div>
     53    <math displaystyle="true">
     54      <mo largeop="false">&#x222B;</mo>
     55      <mo largeop="true">&#x222B;</mo>
     56    </math>
     57    <math displaystyle="true">
     58      <mo largeop="false">&#x2211;</mo>
     59      <mo largeop="true">&#x2211;</mo>
     60    </math>
     61    <math displaystyle="true">
     62      <mo largeop="false">&#x22C1;</mo>
     63      <mo largeop="true">&#x22C1;</mo>
     64    </math>
     65  </body>
     66 </html>