4 <canvas id=
"canvas" width=
"300px" height=
"300px" style=
"border:1px solid #c3c3c3;"></canvas>
6 <script type=
"text/javascript">
7 var ctx
= document
.getElementById('canvas').getContext("2d");
8 ctx
.font
= '15px Arial';
14 ctx
.fillText(ltr
+ 'foo' + stop
+ ltr
+ 'bar' + stop
, 10, 20);
15 ctx
.fillText(ltr
+ 'foo' + stop
+ rtl
+ 'bar' + stop
, 10, 40);
16 ctx
.fillText(rtl
+ 'foo' + stop
+ ltr
+ 'bar' + stop
, 10, 60);
17 ctx
.fillText(rtl
+ 'foo' + stop
+ rtl
+ 'bar' + stop
, 10, 80);