Bug 1536226 [wpt PR 15118] - WIP Add basic 'text-anchor' tests., a=testonly

Automatic update from web-platform-tests
Add basic 'text-anchor' tests. WIP

--
Merge pull request #15118 from Tavmjong/text-anchor

WIP Add basic 'text-anchor' tests.
--

wpt-commits: 0de14e23fdcc1a931c543c5d1965aceddb95c398, ef203a995b71ddee7f7252ec555d8fcc301c5026
wpt-pr: 15118
This commit is contained in:
Tavmjong Bah 2019-03-26 14:10:30 +00:00 коммит произвёл James Graham
Родитель b972d1435a
Коммит e9ddaf4ede
14 изменённых файлов: 719 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,41 @@
<?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: Text Anchor — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text x="80" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<text x="48" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<text x="16" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Просмотреть файл

@ -0,0 +1,60 @@
<?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: Text Anchor — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-001-ref.svg" />
</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>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="80" cy="114.8" r="2" style="fill:red"/>
<text x="80" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<circle cx="240" cy="114.8" r="2" style="fill:red"/>
<text x="48" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<circle cx="400" cy="114.8" r="2" style="fill:red"/>
<text x="17" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px">
<g transform="translate(0,0)">
<text x="80" y="114.8" style="text-anchor:start">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<text x="240" y="114.8" style="text-anchor:middle">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<text x="400" y="114.8" style="text-anchor:end">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 2.2 KiB

Просмотреть файл

@ -0,0 +1,47 @@
<?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: Text Anchor — 002</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text transform="translate(250,10) rotate(90)">
<tspan x="90" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(80,0)">
<text transform="translate(250,-40) rotate(90)" style="text-anchor:middle">
<tspan x="240" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(160,0)">
<text transform="translate(250,-90) rotate(90)" style="text-anchor:end">
<tspan x="390" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Просмотреть файл

@ -0,0 +1,65 @@
<?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: Text Anchor — 002</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-002-ref.svg" />
</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>
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="100" r="2" style="fill:red"/>
<text transform="translate(250,10) rotate(90)">
<tspan x="90" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(80,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text transform="translate(250,-40) rotate(90)" style="text-anchor:middle">
<tspan x="240" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(160,0)">
<circle cx="140" cy="300" r="2" style="fill:red"/>
<text transform="translate(250,-90) rotate(90)" style="text-anchor:end">
<tspan x="390" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="100" style="text-anchor:start">Lorem ipsum dolor sit amet,</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">Lorem ipsum dolor sit amet,</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="300" style="text-anchor:end">Lorem ipsum dolor sit amet,</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Просмотреть файл

@ -0,0 +1,47 @@
<?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: Text Anchor — 003</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text style="text-anchor:end">
<tspan x="400" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,60)">
<text style="text-anchor:middle">
<tspan x="240" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,120)">
<text>
<tspan x="80" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Просмотреть файл

@ -0,0 +1,66 @@
<?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: Text Anchor — 003</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-003-ref.svg" />
</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>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="400" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:end">
<tspan x="400" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,60)">
<circle cx="240" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:middle">
<tspan x="240" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,120)">
<circle cx="80" cy="114.8" r="2" style="fill:red"/>
<text>
<tspan x="80" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;direction:rtl">
<g transform="translate(0,0)">
<text x="400" y="114.8" style="text-anchor:start">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
<g transform="translate(0,60)">
<text x="240" y="114.8" style="text-anchor:middle">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
<g transform="translate(0,120)">
<text x="80" y="114.8" style="text-anchor:end">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Просмотреть файл

@ -0,0 +1,36 @@
<?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: Text Anchor — 102</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: IPAMincho;
src: url("fonts/IPAMincho.woff") format("woff"),
local("IPAMincho");
}
text { font-family: IPAMincho, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text x="132 132 132 132 132 132 132" y="114 130 146 162 178 194 210 ">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="144" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="188" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

@ -0,0 +1,54 @@
<?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: Text Anchor — 102</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-102-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: IPAMincho;
src: url("fonts/IPaMincho.woff") format("woff"),
local("IPAMincho");
}
text { font-family: IPAMincho, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="100" r="2" style="fill:red"/>
<text x="132 132 132 132 132 132 132" y="114 130 146 162 178 194 210 ">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="144" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<circle cx="140" cy="300" r="2" style="fill:red"/>
<text x="140" y="188" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="100" style="text-anchor:start">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="300" style="text-anchor:end">千利奴流乎和加</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Просмотреть файл

@ -0,0 +1,41 @@
<?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: Text Anchor — 201</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text x="200" y="114.8">Lorem ipsum dolor</text>
</g>
<g transform="translate(0,60)">
<text x="200" y="114.8" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(0,120)">
<text x="200" y="114.8" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -0,0 +1,56 @@
<?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: Text Anchor — 201</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-201-ref.svg" />
</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>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8">Lorem ipsum dolor</text>
</g>
<g transform="translate(0,60)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(0,120)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">Lorem ipsum dolor</tspan>
<tspan x="200" y="174.8" style="text-anchor:middle">sit amet, consectetur</tspan>
<tspan x="200" y="234.8" style="text-anchor:end">adipisicing elit,</tspan>
</text>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Просмотреть файл

@ -0,0 +1,41 @@
<?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: Text Anchor — 202</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="200">Lorem ipsum dolor</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="200" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -0,0 +1,56 @@
<?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: Text Anchor — 202</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-202-ref.svg" />
</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>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;writing-mode:tb-rl;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200">Lorem ipsum dolor</text>
</g>
<g transform="translate(80,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(160,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<text>
<tspan x="140" y="200" style="text-anchor:start">Lorem ipsum dolor</tspan>
<tspan x="220" y="200" style="text-anchor:middle">sit amet, consectetur</tspan>
<tspan x="300" y="200" style="text-anchor:end">adipisicing elit,</tspan>
</text>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Просмотреть файл

@ -0,0 +1,47 @@
<?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: Text Anchor — 203</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</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>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text style="text-anchor:end">
<tspan x="200" y="114.8">لكن لا بد أن</tspan>
</text>
</g>
<g transform="translate(0,60)">
<text style="text-anchor:middle">
<tspan x="200" y="114.8" style="text-anchor:middle">أوضح لك أن</tspan>
</text>
</g>
<g transform="translate(0,120)">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">كل هذه الأفكار</tspan>
</text>
</g>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Просмотреть файл

@ -0,0 +1,62 @@
<?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: Text Anchor — 203</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-003-ref.svg" />
</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>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:end">
<tspan x="200" y="114.8">لكن لا بد أن</tspan>
</text>
</g>
<g transform="translate(0,60)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:middle">
<tspan x="200" y="114.8" style="text-anchor:middle">أوضح لك أن</tspan>
</text>
</g>
<g transform="translate(0,120)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text>
<tspan x="200" y="114.8" style="text-anchor:start">كل هذه الأفكار</tspan>
</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;direction:rtl">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">لكن لا بد أن</tspan>
<tspan x="200" y="174.8" style="text-anchor:middle">أوضح لك أن</tspan>
<tspan x="200" y="234.8" style="text-anchor:end">كل هذه الأفكار</tspan>
</text>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 2.1 KiB