blob: d34b349c8474c1d7099472b399a4d030fba47be2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: "SpecialFont";
src: local("Skia");
}
</style>
</head>
<body>
<canvas width="400" height="400"></canvas>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
addEventListener("load", async function() {
document.fonts.load("80px SpecialFont").then(function() {
const context = document.querySelector("canvas").getContext("2d");
context.font = "80px SpecialFont";
context.fillText("aaa", 100, 100);
if (window.testRunner)
testRunner.notifyDone();
}, function() {
if (window.testRunner)
testRunner.notifyDone();
});
});
</script>
</body>
</html>