haikuwebkit/LayoutTests/fast/text/canvas-color-fonts/fill-color-shadow-ctm-COLR....

35 lines
826 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: "WebFont";
src: url("resources/Ahem-COLR.ttf") format("truetype");
}
</style>
</head>
<body>
<canvas id="canvas" width="700" height="500" style="width: 700px; height; 500px;"></canvas>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
let font = "50px 'WebFont'";
document.fonts.load(font).then(function() {
let canvas = document.getElementById("canvas");
let context = canvas.getContext("2d");
context.scale(2, 2);
context.font = font;
context.fillStyle = "white";
context.shadowColor = "green";
context.shadowOffsetX = 100;
context.shadowOffsetY = 100;
context.fillText("BAB", 100, 100);
if (window.testRunner)
testRunner.notifyDone();
});
</script>
</body>
</html>