| <!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> |
| <div style="position: relative;"> |
| <canvas id="canvas" width="700" height="500" style="width: 700px; height; 500px;"></canvas> |
| <div style="position: absolute; left: 198px; top: 118px; width: 304px; height: 4px; background: blue;"></div> |
| <div style="position: absolute; left: 198px; top: 218px; width: 304px; height: 4px; background: blue;"></div> |
| <div style="position: absolute; left: 198px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| <div style="position: absolute; left: 298px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| <div style="position: absolute; left: 318px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| <div style="position: absolute; left: 338px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| <div style="position: absolute; left: 398px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| <div style="position: absolute; left: 498px; top: 118px; width: 4px; height: 104px; background: blue;"></div> |
| </div> |
| <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.fillText("BAB", 100, 100); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }); |
| </script> |
| </body> |
| </html> |