You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

block_hyphenation_kerning.xml 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2006 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- $Id$ -->
  15. <testcase>
  16. <info>
  17. <p>
  18. Checks hyphenation in combination with kerning.
  19. </p>
  20. </info>
  21. <cfg>
  22. <base14kerning>true</base14kerning>
  23. </cfg>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="en" hyphenate="true">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="simple" page-height="5in" page-width="5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="simple">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block font-size="20pt" line-height="1.0" text-align="justify" text-align-last="justify" background-color="lightgray" start-indent="10pt" end-indent="10pt" border="solid 1pt">
  34. hyphenation regression advantage foundation vandalism AVAVAVA vandavanda
  35. hyphenation regression advantage foundation vandalism AVAVAVA vandavanda
  36. hyphenation regression
  37. </fo:block>
  38. </fo:flow>
  39. </fo:page-sequence>
  40. </fo:root>
  41. </fo>
  42. <checks>
  43. <eval expected="1" xpath="count(//pageViewport)"/>
  44. <eval expected="17230" xpath="//flow/block[1]/lineArea[1]/text[1]/@twsadjust"/>
  45. <eval expected="-1339" xpath="//flow/block[1]/lineArea[2]/text[1]/@twsadjust"/>
  46. <eval expected="2393" xpath="//flow/block[1]/lineArea[3]/text[1]/@twsadjust"/>
  47. <eval expected="5900" xpath="//flow/block[1]/lineArea[4]/text[1]/@twsadjust"/>
  48. <eval expected="9900" xpath="//flow/block[1]/lineArea[5]/text[1]/@twsadjust"/>
  49. <!-- In no-break condition there's a -400 kerning between a and v. It musn't occur if "vandavanda" is hyphenated. -->
  50. <eval expected="vanda-" xpath="//flow/block[1]/lineArea[2]/text[1]/word[4]"/>
  51. <eval expected="0 -500 0 0 0 0" xpath="//flow/block[1]/lineArea[2]/text[1]/word[4]/@letter-adjust"/>
  52. <eval expected="vanda" xpath="//flow/block[1]/lineArea[3]/text[1]/word[1]"/>
  53. <eval expected="0 -500 0 0 0" xpath="//flow/block[1]/lineArea[3]/text[1]/word[1]/@letter-adjust"/>
  54. </checks>
  55. </testcase>