Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

block_letter-spacing_text-align_justify.xml 3.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks block level letter-spacing on justified blocks.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block>Next block has no letter-spacing property:</fo:block>
  33. <fo:block text-align="justify">Default space between characters is defined to be 0pt, i.e.,
  34. glyph-areas stacked with no extra space between the allocation-rectangles
  35. of the glyph-areas.</fo:block>
  36. <fo:block>Next block has letter-spacing="normal":</fo:block>
  37. <fo:block text-align="justify" letter-spacing="normal">Default space between characters is defined to be 0pt, i.e.,
  38. glyph-areas stacked with no extra space between the allocation-rectangles
  39. of the glyph-areas.</fo:block>
  40. <fo:block>Next block has letter-spacing="0pt":</fo:block>
  41. <fo:block text-align="justify" letter-spacing="0pt">Default space between characters is defined to be 0pt, i.e.,
  42. glyph-areas stacked with no extra space between the allocation-rectangles
  43. of the glyph-areas.</fo:block>
  44. <fo:block>Next block has letter-spacing="2pt":</fo:block>
  45. <fo:block text-align="justify" letter-spacing="2pt">Default space between characters is defined to be 0pt, i.e.,
  46. glyph-areas stacked with no extra space between the allocation-rectangles
  47. of the glyph-areas.</fo:block>
  48. <fo:block>Next block has letter-spacing.optimum="2pt" letter-spacing.minimum="0pt" letter-spacing.maximum="4pt":</fo:block>
  49. <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.,
  50. glyph-areas stacked with no extra space between the allocation-rectangles
  51. of the glyph-areas.</fo:block>
  52. </fo:flow>
  53. </fo:page-sequence>
  54. </fo:root>
  55. </fo>
  56. <checks>
  57. <true xpath="not(//flow/block[1]/lineArea/text/@tlsadjust)"/>
  58. <true xpath="//flow/block[2]/lineArea/text/@twsadjust"/>
  59. <eval expected="2000" xpath="//flow/block[8]/lineArea[1]/text/@tlsadjust"/>
  60. <true xpath="//flow/block[8]/lineArea[1]/text/@twsadjust"/>
  61. <eval expected="2000" xpath="//flow/block[8]/lineArea[2]/text/@tlsadjust"/>
  62. <true xpath="//flow/block[8]/lineArea[2]/text/@twsadjust"/>
  63. <eval expected="2000" xpath="//flow/block[8]/lineArea[3]/text/@tlsadjust"/>
  64. <true xpath="//flow/block[8]/lineArea[3]/text/@twsadjust"/>
  65. <eval expected="2000" xpath="//flow/block[8]/lineArea[4]/text/@tlsadjust"/>
  66. <!-- text-align doesnt apply to last line Area -->
  67. <true xpath="not(//flow/block[8]/lineArea[4]/text/@twsadjust)"/>
  68. </checks>
  69. </testcase>