| <?xml version="1.0" encoding="utf-8"?> |
| <svg id="svg-root" |
| width="100%" height="100%" viewBox="0 0 480 360" |
| xmlns="http://www.w3.org/2000/svg" |
| xmlns:xlink="http://www.w3.org/1999/xlink" |
| xmlns:html="http://www.w3.org/1999/xhtml"> |
| <g id="testmeta"> |
| <title>Text in Shape — 201</title> |
| <html:link rel="author" |
| title="Tavmjong Bah" |
| href="mailto:tavmjong@free.fr"/> |
| <html:link rel="reviewer" |
| title="NAME_OF_REVIEWER" |
| href="mailto:EMAIL OR http://CONTACT_PAGE" /> |
| <!-- YYYY-MM-DD --> |
| <html:link rel="help" |
| href="https://svgwg.org/svg2-draft/text.html#InlineSize"/> |
| <metadata class="flags">TOKENS</metadata> |
| <desc class="assert">TEST ASSERTION</desc> |
| </g> |
| |
| <style id="test-font" type="text/css"> |
| /* Standard Font (if needed). */ |
| @font-face { |
| font-family: FreeSans; |
| src: url("fonts/FreeSans.woff") format("woff"), |
| local("FreeSans"); |
| } |
| text { font-family: FreeSans, sans-serif } |
| </style> |
| |
| <style id="test-style" type="text/css"> |
| /* Style that is being tested (if needed). */ |
| text { font-family: FreeSans, sans-serif } |
| </style> |
| |
| <defs> |
| <path id="TestPath" d="m 110,100 40,0 m -40,200 40,0"/> |
| </defs> |
| |
| <text id="title" x="240" y="50" style="fill:black; font-size:24px; text-anchor:middle;">Text 'inline-size' — 201</text> |
| <a href="https://svgwg.org/svg2-draft/text.html#InlineSize"> |
| <text id="source" x="240" y="70" style="fill:black; font-size:12px; text-anchor:middle;">https://svgwg.org/svg2-draft/text.html#InlineSize</text> |
| </a> |
| |
| <g id="test-body-reference" style="font-size:16px;fill:red"> |
| <g transform="translate(0,0)"> |
| <use xlink:href="#TestPath" style="fill:none;stroke:lightblue"/> |
| <text style="writing-mode:tb-rl"> |
| <tspan x="140" y="100">漢字</tspan> |
| <tspan x="140" y="132">Lorem ipsum</tspan> |
| <tspan x="140" y="227.7">漢字</tspan> |
| </text> |
| </g> |
| <g transform="translate(80,0)"> |
| <use xlink:href="#TestPath" style="fill:none;stroke:lightblue"/> |
| <text transform="translate(250,-40) rotate(90)"> |
| <tspan x="140" y="110">漢字Lorem ipsum!漢字</tspan> |
| </text> |
| </g> |
| <g transform="translate(160,0)"> |
| <use xlink:href="#TestPath" style="fill:none;stroke:lightblue"/> |
| <text transform="translate(250,-40) rotate(90)"> |
| <tspan x="140" y="110">漢字!لكن لا بد أن漢字</tspan> |
| </text> |
| </g> |
| <g transform="translate(240,0)"> |
| <use xlink:href="#TestPath" style="fill:none;stroke:lightblue"/> |
| <text transform="translate(250,-40) rotate(90)" style="direction:rtl;text-anchor:end"> |
| <tspan x="140" y="110">漢字!لكن لا بد أن漢字</tspan> |
| </text> |
| </g> |
| </g> |
| |
| <!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit, --> |
| <g id="test-body-content" style="font-size:16px;line-spacing:1.25;writing-mode:tb-rl;fill:green"> |
| <g transform="translate(0,0)"> |
| <text x="140" y="100" style="inline-size:200px">漢字Lorem ipsum!漢字</text> |
| </g> |
| <g transform="translate(80,0)" style="text-orientation:sideways"> |
| <text x="140" y="100" style="inline-size:200px">漢字Lorem ipsum!漢字</text> |
| </g> |
| <g transform="translate(160,0)" style="text-orientation:sideways"> |
| <text x="140" y="100" style="inline-size:200px">漢字!لكن لا بد أن漢字</text> |
| </g> |
| <g transform="translate(240,0)" style="direction:rtl;text-orientation:sideways"> |
| <text x="140" y="100" style="inline-size:200px">漢字!لكن لا بد أن漢字</text> |
| </g> |
| </g> |
| |
| </svg> |