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.

letter-spacing2.xml 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright 2005 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: text-decoration1.xml 198408 2005-02-09 21:38:31Z jeremias $ -->
  15. <testcase>
  16. <info>
  17. <p>
  18. This test checks block level letter-spacing on justified blocks.
  19. </p>
  20. </info>
  21. <fo>
  22. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  23. <fo:layout-master-set>
  24. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  25. <fo:region-body/>
  26. </fo:simple-page-master>
  27. </fo:layout-master-set>
  28. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  29. <fo:flow flow-name="xsl-region-body">
  30. <fo:block>Next block has no letter-spacing property:</fo:block>
  31. <fo:block text-align="justify">Default space between characters is defined to be 0pt, i.e.,
  32. glyph-areas stacked with no extra space between the allocation-rectangles
  33. of the glyph-areas.</fo:block>
  34. <fo:block>Next block has letter-spacing="normal":</fo:block>
  35. <fo:block text-align="justify" letter-spacing="normal">Default space between characters is defined to be 0pt, i.e.,
  36. glyph-areas stacked with no extra space between the allocation-rectangles
  37. of the glyph-areas.</fo:block>
  38. <fo:block>Next block has letter-spacing="0pt":</fo:block>
  39. <fo:block text-align="justify" letter-spacing="0pt">Default space between characters is defined to be 0pt, i.e.,
  40. glyph-areas stacked with no extra space between the allocation-rectangles
  41. of the glyph-areas.</fo:block>
  42. <fo:block>Next block has letter-spacing="2pt":</fo:block>
  43. <fo:block text-align="justify" letter-spacing="2pt">Default space between characters is defined to be 0pt, i.e.,
  44. glyph-areas stacked with no extra space between the allocation-rectangles
  45. of the glyph-areas.</fo:block>
  46. <fo:block>Next block has letter-spacing.optimum="2pt" letter-spacing.minimum="0pt" letter-spacing.maximum="4pt":</fo:block>
  47. <fo:block text-align="justify" letter-spacing.optimum="2pt" letter-spacing.minimum="0pt" letter-spacing.maximum="4pt">Default space between characters is defined to be 0pt, i.e.,
  48. glyph-areas stacked with no extra space between the allocation-rectangles
  49. of the glyph-areas.</fo:block>
  50. </fo:flow>
  51. </fo:page-sequence>
  52. </fo:root>
  53. </fo>
  54. <checks>
  55. <true xpath="not(//flow/block[1]/lineArea/text/@tlsadjust)"/>
  56. <true xpath="//flow/block[2]/lineArea/text/@twsadjust"/>
  57. <eval expected="2000" xpath="//flow/block[8]/lineArea[1]/text/@tlsadjust"/>
  58. <true xpath="//flow/block[8]/lineArea[1]/text/@twsadjust"/>
  59. <eval expected="2000" xpath="//flow/block[8]/lineArea[2]/text/@tlsadjust"/>
  60. <true xpath="//flow/block[8]/lineArea[2]/text/@twsadjust"/>
  61. <eval expected="2000" xpath="//flow/block[8]/lineArea[3]/text/@tlsadjust"/>
  62. <true xpath="//flow/block[8]/lineArea[3]/text/@twsadjust"/>
  63. <eval expected="2000" xpath="//flow/block[8]/lineArea[4]/text/@tlsadjust"/>
  64. <!-- text-align doesnt apply to last line Area -->
  65. <true xpath="not(//flow/block[8]/lineArea[4]/text/@twsadjust)"/>
  66. </checks>
  67. </testcase>