aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-12-22 14:14:40 +0000
committerJeremias Maerki <jeremias@apache.org>2008-12-22 14:14:40 +0000
commit10cb96278c0b8447ee82070ddfdce5255eea80e3 (patch)
tree9155f8f5a868c79a2e3770570fc38b170b0e8af7 /test
parent8ef2099f5d82ff553b2c34420eb269d1e9d07b22 (diff)
downloadxmlgraphics-fop-10cb96278c0b8447ee82070ddfdce5255eea80e3.tar.gz
xmlgraphics-fop-10cb96278c0b8447ee82070ddfdce5255eea80e3.zip
Fixed another spacing issue in IFRenderer.
Checks for spacing (kerning, letter-space and word-space combinations). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@728700 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/block_letter-spacing.xml16
-rw-r--r--test/layoutengine/standard-testcases/kerning_1_on.xml48
2 files changed, 64 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/block_letter-spacing.xml b/test/layoutengine/standard-testcases/block_letter-spacing.xml
index 946571311..73f9b8e3a 100644
--- a/test/layoutengine/standard-testcases/block_letter-spacing.xml
+++ b/test/layoutengine/standard-testcases/block_letter-spacing.xml
@@ -62,4 +62,20 @@
<eval expected="2000" xpath="//flow/block[8]/lineArea[3]/text/@tlsadjust"/>
<eval expected="2000" xpath="//flow/block[8]/lineArea[4]/text/@tlsadjust"/>
</checks>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+ <eval expected="Default space between characters is defined to be 0pt, i.e.," xpath="//if:text[2]"/>
+ <eval expected="0" xpath="//if:text[2]/@x"/>
+ <eval expected="24666" xpath="//if:text[2]/@y"/>
+ <true xpath="not(//if:text[2]/@dx)"/>
+
+ <eval expected="Default space between characters is defined to" xpath="//if:text[14]"/>
+ <eval expected="0" xpath="//if:text[14]/@x"/>
+ <eval expected="197466" xpath="//if:text[14]/@y"/>
+ <eval expected="0 2000 2000 2000 2000 2000 2000 0 4000 2000 2000 2000 2000 0 4000 2000 2000 2000 2000 2000 2000 0 4000 2000 2000 2000 2000 2000 2000 2000 2000 2000 0 4000 2000 0 4000 2000 2000 2000 2000 2000 2000 0 4000 2000" xpath="//if:text[14]/@dx"/>
+
+ <eval expected="Default space between characters is defined to be" xpath="//if:text[20]"/>
+ <eval expected="0" xpath="//if:text[20]/@x"/>
+ <eval expected="283866" xpath="//if:text[20]/@y"/>
+ <eval expected="0 1938 1938 1938 1938 1938 1938 0 3836 1938 1938 1938 1938 0 3836 1938 1938 1938 1938 1938 1938 0 3836 1938 1938 1938 1938 1938 1938 1938 1938 1938 0 3836 1938 0 3836 1938 1938 1938 1938 1938 1938 0 3836 1938 0 3836 1938" xpath="//if:text[20]/@dx"/>
+ </if-checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/kerning_1_on.xml b/test/layoutengine/standard-testcases/kerning_1_on.xml
index 4cc016cc2..df74f09c5 100644
--- a/test/layoutengine/standard-testcases/kerning_1_on.xml
+++ b/test/layoutengine/standard-testcases/kerning_1_on.xml
@@ -40,6 +40,12 @@
<fo:block letter-spacing="1pt">
<fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
</fo:block>
+ <fo:block word-spacing="5pt">
+ <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+ </fo:block>
+ <fo:block letter-spacing="1pt" word-spacing="5pt">
+ <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+ </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
@@ -54,4 +60,46 @@
<eval expected="0" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@offset"/>
<eval expected="0 -960 -840 -960 -840" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@letter-adjust"/>
</checks>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+ <eval expected="VAVAV" xpath="//if:text[1]"/>
+ <eval expected="0" xpath="//if:text[1]/@x"/>
+ <eval expected="10266" xpath="//if:text[1]/@y"/>
+ <eval expected="0 -960 -840 -960 -840" xpath="//if:text[1]/@dx"/>
+
+ <eval expected=" text-text Hello World." xpath="//if:text[2]"/>
+ <eval expected="36420" xpath="//if:text[2]/@x"/>
+ <eval expected="10266" xpath="//if:text[2]/@y"/>
+ <eval expected="0 0 0 -360 0 0 0 0 -360 0 0 0 0 0 0 0 0 0 -360 0 180" xpath="//if:text[2]/@dx"/>
+
+ <eval expected="VAVAV" xpath="//if:text[3]"/>
+ <eval expected="0" xpath="//if:text[3]/@x"/>
+ <eval expected="24666" xpath="//if:text[3]/@y"/>
+ <eval expected="0 40 160 40 160" xpath="//if:text[3]/@dx"/>
+
+ <eval expected=" text-text Hello World." xpath="//if:text[4]"/>
+ <eval expected="40420" xpath="//if:text[4]/@x"/>
+ <eval expected="24666" xpath="//if:text[4]/@y"/>
+ <eval expected="0 2000 1000 640 1000 1000 1000 1000 640 1000 0 2000 1000 1000 1000 1000 0 2000 640 1000 1180 1000 1000" xpath="//if:text[4]/@dx"/>
+
+ <eval expected="VAVAV" xpath="//if:text[5]"/>
+ <eval expected="0" xpath="//if:text[5]/@x"/>
+ <eval expected="39066" xpath="//if:text[5]/@y"/>
+ <eval expected="0 -960 -840 -960 -840" xpath="//if:text[5]/@dx"/>
+
+ <eval expected=" text-text Hello World." xpath="//if:text[6]"/>
+ <eval expected="36420" xpath="//if:text[6]/@x"/>
+ <eval expected="39066" xpath="//if:text[6]/@y"/>
+ <eval expected="0 5000 0 -360 0 0 0 0 -360 0 0 5000 0 0 0 0 0 5000 -360 0 180" xpath="//if:text[6]/@dx"/>
+
+ <eval expected="VAVAV" xpath="//if:text[7]"/>
+ <eval expected="0" xpath="//if:text[7]/@x"/>
+ <eval expected="53466" xpath="//if:text[7]/@y"/>
+ <eval expected="0 40 160 40 160" xpath="//if:text[7]/@dx"/>
+
+ <eval expected=" text-text Hello World." xpath="//if:text[8]"/>
+ <eval expected="40420" xpath="//if:text[8]/@x"/>
+ <eval expected="53466" xpath="//if:text[8]/@y"/>
+ <eval expected="0 5000 1000 640 1000 1000 1000 1000 640 1000 0 5000 1000 1000 1000 1000 0 5000 640 1000 1180 1000 1000" xpath="//if:text[8]/@dx"/>
+
+ </if-checks>
</testcase>