Skip to content

Commit

Permalink
[mathml] Use Ahem font in mathml/relations/css-styling/display-2.html
Browse files Browse the repository at this point in the history
That way we ensure that the font is the same in all platforms,
and we just need a generic -expected.txt file.

Change-Id: Ia5751e5de15c007619968f47f7015df49480d049
  • Loading branch information
mrego authored and chromium-wpt-export-bot committed Jul 7, 2021
1 parent 1395825 commit 7b6a9ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mathml/relations/css-styling/display-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/layout-comparison.js"></script>
<script src="/mathml/support/mathml-fragments.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
mfrac {
padding: 0;
Expand Down Expand Up @@ -97,7 +98,7 @@
};

setup({ explicit_done: true });
window.addEventListener("load", runTests);
document.fonts.ready.then(() => { runTests(); })

function runTests() {

Expand All @@ -108,7 +109,7 @@
replace(/X/g, `<mspace style="display: inline-block; width: ${Xsize}px; height: ${Xsize}px; background: black"></mspace>`);
let reference = mathtest.
replace(/maction|math|mfrac|mmultiscripts|mover|mover|mpadded|mrow|mspace|msubsup|msub|msup|mtable|munderover|munder/g, "div");
document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
document.body.insertAdjacentHTML("beforeend", `<div style="font: 20px/1 Ahem; position: absolute;">\
<div><span>${key}:</span>${mathtest}</div>\
<div><span>${key}:</span>${reference}</div>\
</div>`);
Expand Down

0 comments on commit 7b6a9ff

Please sign in to comment.