summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/import/text-text-04-t-manual.svg
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/svg/import/text-text-04-t-manual.svg
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/import/text-text-04-t-manual.svg')
-rw-r--r--testing/web-platform/tests/svg/import/text-text-04-t-manual.svg226
1 files changed, 226 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/import/text-text-04-t-manual.svg b/testing/web-platform/tests/svg/import/text-text-04-t-manual.svg
new file mode 100644
index 0000000000..aeeb716f2c
--- /dev/null
+++ b/testing/web-platform/tests/svg/import/text-text-04-t-manual.svg
@@ -0,0 +1,226 @@
+<svg version="1.1" baseProfile="tiny" 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">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="AE" author="VH" status="accepted"
+ version="$Revision: 1.12 $" testname="$RCSfile: text-text-04-t.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#TextElement">
+ <p>
+ The purpose of this test is to validate proper handling of
+ the text element's x and y attributes.
+ In the various samples, a orange marker shows the text's (0,0)
+ coordinate. The blue markers show the current text positions.
+ These are either defined by absolute x/y positioning or they
+ are computed from the embeded font's glyphs advances.
+ </p>
+ <p>
+ The first text sample shows a reference piece of text.
+ </p>
+ <p>
+ The second text sample (x all) shows a piece of text where
+ all the glyphs are positioned along the x axis.
+ </p>
+ <p>
+ The third text sample (x more) is a text element where there
+ are more x values than characters (5 values for 4 characters).
+ The last x value should be ignored and the result should
+ be the same as the third sample.
+ </p>
+ <p>
+ The fourth text sample (x fewer) is a text element where there
+ are fewer x values than characters (3 values for 4 characters).
+ The last character should not be positioned but laid out normally,
+ following its previous character sibling.
+ </p>
+ <p>
+ The fifth (y all), sixth (y more) and seventh (y fewer) text sample
+ parallel the second,
+ third and fourth test, but for the y attribute values.
+ </p>
+ <p>
+ The samples in the right column show combinations of x/y
+ value sets.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ In all the above tests, blue markers represent the expected glyph
+ positions. The orange markers are showing positions where no glyph
+ should appear. The glyphs are black squares of increasing sizes.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: text-text-04-t.svg,v $</title>
+ <style type="text/css">
+ @font-face {
+ font-family: embeded;
+ src: url(woffs/embeded-text-text-04.woff) format("woff");
+ }
+ </style>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ <font id="embeded" horiz-adv-x="224">
+ <font-face font-family="embeded" units-per-em="1000" ascent="1000" descent="-250" alphabetic="0"/>
+ <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z"/>
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="750" d="M 0 0 L 250 0 L 250 250 L 0 250 Z"/>
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="750" d="M 0 0 L 500 0 L 500 500 L 0 500 Z"/>
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z"/>
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="750" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z"/>
+ </font>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-size="16">
+ <g id="reference" transform="translate(130, 40)">
+ <text text-anchor="end" x="-30">Reference</text>
+ <g>
+ <use xlink:href="#marker" x="0" fill="#8888FF"/>
+ <use xlink:href="#marker" x="15" fill="#8888FF"/>
+ <use xlink:href="#marker" x="30" fill="#8888FF"/>
+ <use xlink:href="#marker" x="45" fill="#8888FF"/>
+ <text id="ref" font-family="embeded" font-size="20">1234</text>
+ </g>
+ </g>
+ <defs>
+ <rect id="marker" x="-4" y="-4" width="8" height="8"/>
+ </defs>
+ <g id="xAll" transform="translate(130, 80)">
+ <text text-anchor="end" x="-30">x all</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" fill="#8888FF"/>
+ <use xlink:href="#marker" x="80" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60 80">1234</text>
+ </g>
+
+ <g id="xMore" transform="translate(130, 120)">
+ <text text-anchor="end" x="-30">x more</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" fill="#8888FF"/>
+ <use xlink:href="#marker" x="80" fill="#8888FF"/>
+ <use xlink:href="#marker" x="100" fill="orange"/>
+ <text font-family="embeded" font-size="20" x="20 40 60 80 100">1234</text>
+ </g>
+
+ <g id="xFewer" transform="translate(130, 160)">
+ <text text-anchor="end" x="-30">x fewer</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" fill="#8888FF"/>
+ <use xlink:href="#marker" x="75" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60">1234</text>
+ </g>
+
+ <g id="yAll" transform="translate(130, 200)">
+ <text text-anchor="end" x="-30">y all</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="45" y="10" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" y="-10 -5 5 10">1234</text>
+ </g>
+
+ <g id="yMore" transform="translate(130, 250)">
+ <text text-anchor="end" x="-30">y more</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="45" y="10" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" y="-10 -5 5 10 20">1234</text>
+ </g>
+
+ <g id="yFewer" transform="translate(130, 300)">
+ <text text-anchor="end" x="-30">y fewer</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="45" y="5" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" y="-10 -5 5">1234</text>
+ </g>
+
+ <g transform="translate(220, 0)">
+ <g id="xyAll" transform="translate(130, 80)">
+ <text text-anchor="end" x="-30">x/y all</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="80" y="10" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60 80" y="-10 -5 5 10">1234</text>
+ </g>
+
+ <g id="xyMore" transform="translate(130, 120)">
+ <text text-anchor="end" x="-30">x/y more</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="80" y="10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="100" y="20" fill="orange"/>
+ <text font-family="embeded" font-size="20" x="20 40 60 80 100" y="-10 -5 5 10 20">1234</text>
+ </g>
+
+ <g id="xyFewer" transform="translate(130, 160)">
+ <text text-anchor="end" x="-30">x/y fewer</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="75" y="5" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60" y="-10 -5 5">1234</text>
+ </g>
+
+ <g id="xAllyFewer" transform="translate(130, 200)">
+ <text text-anchor="end" x="-30">x all y fewer</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="80" y="5" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60 80" y="-10 -5 5">1234</text>
+ </g>
+
+ <g id="xFewerYall" transform="translate(130, 240)">
+ <text text-anchor="end" x="-30">x fewer y all</text>
+ <use xlink:href="#marker" x="0" fill="orange"/>
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF"/>
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF"/>
+ <use xlink:href="#marker" x="77.52" y="10" fill="#8888FF"/>
+ <text font-family="embeded" font-size="20" x="20 40 60" y="-10 -5 5 10">1234</text>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>