blob: 4ac353a763e9b06d3170a232e8aa2d78453bacd9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: "WebFont";
src: url("resources/Ahem-COLR.ttf") format("truetype");
}
</style>
</head>
<body>
<div style="position: relative;">
<canvas id="canvas" width="750" height="350" style="width: 750px; height; 350px;"></canvas>
<div style="position: absolute; left: 98px; top: 38px; width: 604px; height: 4px; background: blue;"></div>
<div style="position: absolute; left: 98px; top: 238px; width: 604px; height: 4px; background: blue;"></div>
<div style="position: absolute; left: 98px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
<div style="position: absolute; left: 298px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
<div style="position: absolute; left: 338px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
<div style="position: absolute; left: 378px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
<div style="position: absolute; left: 498px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
<div style="position: absolute; left: 698px; top: 38px; width: 4px; height: 204px; background: blue;"></div>
</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
let font = "200px 'WebFont'";
document.fonts.load(font).then(function() {
let canvas = document.getElementById("canvas");
let context = canvas.getContext("2d");
context.font = font;
context.fillText("BAB", 100, 200);
if (self.testRunner)
testRunner.notifyDone();
});
</script>
</body>
</html>