blob: ed7a71162e473365ab9395c57b8175671c310944 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: "WebFont";
src: url("resources/Ahem-SVG.ttf") format("truetype");
}
</style>
</head>
<body>
<p>
This test makes sure that OT-SVG glyphs can be drawn into canvas.
The test passes if you see:
<ol>
<li>A medium-sized black square, then</li>
<li>A slightly smaller green square, then</li>
<li>A medium-sized black square, then</li>
<li>A slightly smaller green square</li>
</p>
<canvas id="canvas" width="400" height="400"></canvas>
<script>
if (self.testRunner)
testRunner.waitUntilDone();
var context = document.getElementById("canvas").getContext("2d");
[...document.fonts][0].load().then(function() {
context.font = "50px 'WebFont'";
context.fillText("bAbA", 10, 100);
if (self.testRunner)
testRunner.notifyDone();
});
</script>
</body>
</html>