Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/text/reftests/text-shape-inside-001.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
<g id="testmeta">
<title>Text in Shape — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="reviewer"
title="NAME_OF_REVIEWER"
<!-- YYYY-MM-DD -->
<html:link rel="help"
<html:link rel="match" href="text-shape-inside-001-ref.svg" />
<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>
<rect id="TestRect" x="90" y="100" width="300" height="40"/>
</defs>
<g id="test-body-content" style="font-size:16px;line-spacing:1.25">
<g transform="translate(0,0)">
<use xlink:href="#TestRect" style="fill:none;stroke:lightblue"/>
<text style="shape-inside:url(#TestRect)">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<use xlink:href="#TestRect" style="fill:none;stroke:lightblue"/>
<text style="shape-inside:url(#TestRect);text-align:center">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<use xlink:href="#TestRect" style="fill:none;stroke:lightblue"/>
<text style="shape-inside:url(#TestRect);text-align:right">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,180)">
<use xlink:href="#TestRect" style="fill:none;stroke:lightblue"/>
<text style="shape-inside:url(#TestRect);text-align:justify">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
</svg>