| These tests are obtained from the SVG 1.2 Tiny BiDi test suite: |
| 1) http://www.w3.org/International/tests/svg/test-direction-unicode-bidi-0 |
| |
| I copied all tests manually, and renamed them according to this conention: |
| -> Section "1. Direction on tspan in text elements" |
| -> Test "1 Default context, inline dirRTL ubEmbed" |
| --> tspan-dirRTL-ubEmbed-in-default-context.svg |
| -> Test "2 Default context, inline dirRTL ubNone" |
| --> tspan-dirRTL-ubNone-in-default-context.svg |
| ... |
| |
| All references to SVGFonts have been removed (remove the <defs> section, rename font-family="SVGFreeSansASCII,sans-serif" to font-family="Arial"). |
| Correct image references from "fooX.png" to "resources/fooX.png". |
| |
| These tests are made for SVG 1.2 Tiny, which has a different definition for the "direction" property compared to SVG 1.1 First/Second Edition. |
| |
| SVG 1.1 First/Second edition says: (http://www.w3.org/TR/SVG/text.html#RelationshipWithBiDirectionality) |
| This property specifies the base writing direction of text and the direction of embeddings and overrides (see 'unicode-bidi') for the Unicode bidirectional algorithm. For the 'direction' property to have any effect, the 'unicode-bidi' property's value must be 'embed' or 'bidi-override'. |
| |
| SVG 1.2 Tiny says: (http://www.w3.org/TR/SVGTiny12/text.html#DirectionProperty) |
| This property specifies the base writing direction of text and the direction of embeddings and overrides (see 'unicode-bidi') for the Unicode bidirectional algorithm. For the 'direction' property to have any effect on an element that does not by itself establish a new text chunk (such as the 'tspan' element in SVG 1.2 Tiny), the 'unicode-bidi' property's value must be embed or bidi-override. |
| |
| The main difference is that <text x="10" y="10" direction="rtl">foo bar</text> defines the start of a new text chunk |
| and thus the direction property is taken into account, whereas in SVG 1.1 the direction property would be ignored |
| unless you explicitely set unicode-bidi to embed/bidi-override. This is now handled properly in WebKit, as it's easy to make both 1.1/1.2 mode work for us. |
| |
| 2) http://www.w3.org/International/tests/svg/test-direction-alignment-0 |