tor-browser

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

svg-in-ot-bitmap-1.html (1060B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <head>
      4    <meta charset="utf-8">
      5    <title>SVG-in-OT bitmap issue</title>
      6    <style>
      7        @font-face {
      8            font-family: test;
      9            src: url("resources/svg-bitmap.ttf");
     10        }
     11    </style>
     12    <script>
     13        // Spin for 1 second using requestAnimationFrame, which should be plenty
     14        // for the PNG images in the SVG-in-OT font to be decoded.
     15        let start;
     16        function rAF(timestamp) {
     17            if (start === undefined) {
     18                start = timestamp;
     19            }
     20            if (timestamp - start < 1000) {
     21                window.requestAnimationFrame(rAF);
     22            } else {
     23                document.documentElement.classList.remove("reftest-wait");
     24            }
     25        }
     26    </script>
     27 </head>
     28 <body onload="window.requestAnimationFrame(rAF)">
     29    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 50" x="0" y="0" width="400" height="50">
     30        <text x="0" y="24" font-family="test, serif" font-size="32px">x ABC x</text>
     31    </svg>
     32 </body>
     33 </html>