mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
39 lines
903 B
HTML
39 lines
903 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
|
<title>Bug 624359</title>
|
||
|
<style type="text/css">
|
||
|
@font-face {
|
||
|
font-family: test;
|
||
|
src: url(../fonts/sil/GenR102.ttf);
|
||
|
};
|
||
|
</style>
|
||
|
<script type="text/javascript">
|
||
|
function draw()
|
||
|
{
|
||
|
var txt = 'x';
|
||
|
var canvas = document.getElementById("foo");
|
||
|
var width = canvas.width;
|
||
|
var height = canvas.height;
|
||
|
var ctx = canvas.getContext('2d');
|
||
|
ctx.font = "150px test";
|
||
|
ctx.fillStyle = 'white';
|
||
|
ctx.fillRect(0, 0, width, height);
|
||
|
ctx.save();
|
||
|
ctx.fillStyle = 'black';
|
||
|
ctx.beginPath();
|
||
|
ctx.translate(25, height / 2);
|
||
|
ctx.moveTo(0,0);
|
||
|
ctx.lineTo(40,0);
|
||
|
ctx.lineTo(40,200);
|
||
|
ctx.mozTextAlongPath(txt, false);
|
||
|
ctx.restore();
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="draw();">
|
||
|
<div style="font-family: test;">Cluster in mozTextAlongPath:</div>
|
||
|
<canvas id="foo" width="100" height="500"></canvas>
|
||
|
</body>
|
||
|
</html>
|