3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
6 <svg width=
"100" viewBox=
"0 0 200 400">
7 <title>Mixed Scripts and Writing Modes
</title>
8 <style type=
"text/css">
10 font: 20px sans-serif
;
14 <g color=
"darkGreen" text-anchor=
"start">
15 <g id=
"sample" fill=
"currentColor" writing-mode=
"tb">
16 <text x=
"1em" y=
"2em">您好SVG
</text>
21 var html
= document
.documentElement
;
23 var textElement
= document
.querySelector('text');
24 for (var i
=0; i
<5; i
++)
25 positions
.push(textElement
.getStartPositionOfChar(i
).x
);
27 for (var i
=0; i
<5; i
++) {
28 newPos
= textElement
.getStartPositionOfChar(i
).x
;
30 assert_approx_equals(newPos
, positions
[i
], 1);
31 }, "Position of character index " + i
+ " unaffected by zoom level");