aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-12-22 20:10:54 +0000
committerJeremias Maerki <jeremias@apache.org>2005-12-22 20:10:54 +0000
commit250a5e5363af3462693c80227e0666d0b5b75a8f (patch)
tree08472457a78d2cc6cf8e8c6b4ae98ee4180d7c59 /test
parent3e74ade6902eb4ce94c5c6c7566a900437f4702b (diff)
downloadxmlgraphics-fop-250a5e5363af3462693c80227e0666d0b5b75a8f.tar.gz
xmlgraphics-fop-250a5e5363af3462693c80227e0666d0b5b75a8f.zip
As announced, I brought FontTriplet to more life by making it Serializable and using it to transport the information about the font in use through the area tree. This has small effects on the test cases as the values in the generated XML are slightly different. While refactoring I saw that there's some room for optimization. Too many objects are still created. It should be quite easy now with the FontTriplet to create a small cache.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@358613 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/block_font-family.xml14
-rw-r--r--test/layoutengine/standard-testcases/block_font-style.xml14
2 files changed, 17 insertions, 11 deletions
diff --git a/test/layoutengine/standard-testcases/block_font-family.xml b/test/layoutengine/standard-testcases/block_font-family.xml
index 9729b7d42..9cb9eee23 100644
--- a/test/layoutengine/standard-testcases/block_font-family.xml
+++ b/test/layoutengine/standard-testcases/block_font-family.xml
@@ -44,14 +44,14 @@
</fo:root>
</fo>
<checks>
- <eval expected="Helvetica" xpath="//flow/block[1]/lineArea/text/@font-name"/>
- <eval expected="Times-Roman" xpath="//flow/block[2]/lineArea/text/@font-name"/>
- <eval expected="Helvetica" xpath="//flow/block[3]/lineArea/text/@font-name"/>
- <eval expected="Times-Roman" xpath="//flow/block[4]/lineArea/text/@font-name"/>
- <eval expected="Times-Roman" xpath="//flow/block[5]/lineArea/text/@font-name"/>
- <eval expected="Courier" xpath="//flow/block[6]/lineArea/text/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[1]/lineArea/text/@font-name"/>
+ <eval expected="serif" xpath="//flow/block[2]/lineArea/text/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[3]/lineArea/text/@font-name"/>
+ <eval expected="any" xpath="//flow/block[4]/lineArea/text/@font-name"/>
+ <eval expected="any" xpath="//flow/block[5]/lineArea/text/@font-name"/>
+ <eval expected="monospace" xpath="//flow/block[6]/lineArea/text/@font-name"/>
<eval expected="Helvetica" xpath="//flow/block[7]/lineArea/text/@font-name"/>
<eval expected="Helvetica" xpath="//flow/block[8]/lineArea/text/@font-name"/>
- <eval expected="Courier" xpath="//flow/block[9]/lineArea/text/@font-name"/>
+ <eval expected="monospace" xpath="//flow/block[9]/lineArea/text/@font-name"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/block_font-style.xml b/test/layoutengine/standard-testcases/block_font-style.xml
index 326664717..20eebf5c1 100644
--- a/test/layoutengine/standard-testcases/block_font-style.xml
+++ b/test/layoutengine/standard-testcases/block_font-style.xml
@@ -42,7 +42,7 @@
<fo:block font-family="sans-serif" font-style="italic">font-family="sans-serif" font-style="italic"</fo:block>
<fo:block font-family="sans-serif" font-style="oblique">font-family="sans-serif" font-style="oblique"</fo:block>
<fo:block font-family="sans-serif" font-style="backslant">font-family="sans-serif" font-style="backslant"</fo:block>
- <fo:block font-family="sans-serif" font-style="obscure">font-family="serif" font-style="obscure"</fo:block>
+ <fo:block font-family="sans-serif" font-style="obscure">font-family="sans-serif" font-style="obscure"</fo:block>
<fo:block font-family="monospace">font-family="monospace" font-style not given</fo:block>
<fo:block font-family="monospace" font-style="normal">font-family="monospace" font-style="normal"</fo:block>
@@ -58,22 +58,28 @@
<eval expected="normal" xpath="//flow/block[1]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[2]/lineArea/text/@font-style"/>
<eval expected="italic" xpath="//flow/block[3]/lineArea/text/@font-style"/>
- <eval expected="italic" xpath="//flow/block[4]/lineArea/text/@font-style"/>
+ <eval expected="oblique" xpath="//flow/block[4]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[5]/lineArea/text/@font-style"/>
+ <eval expected="any" xpath="//flow/block[5]/lineArea/text/@font-name"/> <!-- style not registered -> any, normal -->
<eval expected="normal" xpath="//flow/block[6]/lineArea/text/@font-style"/>
+ <eval expected="serif" xpath="//flow/block[6]/lineArea/text/@font-name"/> <!-- illegal style -> back to default=serif, normal -->
<eval expected="normal" xpath="//flow/block[7]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[8]/lineArea/text/@font-style"/>
<eval expected="italic" xpath="//flow/block[9]/lineArea/text/@font-style"/>
- <eval expected="italic" xpath="//flow/block[10]/lineArea/text/@font-style"/>
+ <eval expected="oblique" xpath="//flow/block[10]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[11]/lineArea/text/@font-style"/>
+ <eval expected="any" xpath="//flow/block[11]/lineArea/text/@font-name"/> <!-- style not registered -> any, normal -->
<eval expected="normal" xpath="//flow/block[12]/lineArea/text/@font-style"/>
+ <eval expected="sans-serif" xpath="//flow/block[12]/lineArea/text/@font-name"/> <!-- illegal style -> back to default=sans-serif, normal -->
<eval expected="normal" xpath="//flow/block[13]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[14]/lineArea/text/@font-style"/>
<eval expected="italic" xpath="//flow/block[15]/lineArea/text/@font-style"/>
- <eval expected="italic" xpath="//flow/block[16]/lineArea/text/@font-style"/>
+ <eval expected="oblique" xpath="//flow/block[16]/lineArea/text/@font-style"/>
<eval expected="normal" xpath="//flow/block[17]/lineArea/text/@font-style"/>
+ <eval expected="any" xpath="//flow/block[17]/lineArea/text/@font-name"/> <!-- style not registered -> any, normal -->
<eval expected="normal" xpath="//flow/block[18]/lineArea/text/@font-style"/>
+ <eval expected="monospace" xpath="//flow/block[18]/lineArea/text/@font-name"/> <!-- illegal style -> back to default=monospace, normal -->
</checks>
</testcase>