您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

block_shy_linebreaking_hyph.xml 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 Soft Hyphen breaking with hyphenation enabled.
  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" language="en">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="2.5in" page-height="10in" margin="5pt">
  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" font-size="10pt">
  32. <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
  33. Reference block without soft Hyphen and with hyphenation enabled
  34. </fo:block>
  35. <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt" hyphenate="true">
  36. VeryLongWordWithLotsOfSoftHyphensPutInBetweenAndAround
  37. </fo:block>
  38. <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
  39. BA - Break Opportunity After (A) - Conditional Hyphen with hyphenation enabled
  40. </fo:block>
  41. <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt" hyphenate="true">
  42. &#x00ad;Very&#x00ad;Long&#x00ad;Word&#x00ad;With&#x00ad;Lots&#x00ad;&#x00ad;&#x00ad;Of&#x00ad;&#x00ad;&#x00ad;Soft&#x00ad;&#x00ad;&#x00ad;Hyphens&#x00ad;&#x00ad;&#x00ad;Put&#x00ad;&#x00ad;&#x00ad;In&#x00ad;Between&#x00ad;And&#x00ad;Around&#x00ad;
  43. </fo:block>
  44. </fo:flow>
  45. </fo:page-sequence>
  46. </fo:root>
  47. </fo>
  48. <checks>
  49. <eval expected="2" xpath="count(//flow/block[2]/lineArea)"/>
  50. <eval expected="149490" xpath="//flow/block[2]/lineArea[1]/text/@ipd"/>
  51. <eval expected="139530" xpath="//flow/block[2]/lineArea[2]/text/@ipd"/>
  52. <eval expected="2" xpath="count(//flow/block[4]/lineArea)"/>
  53. <eval expected="137270" xpath="//flow/block[4]/lineArea[1]/text/@ipd"/>
  54. <eval expected="151750" xpath="//flow/block[4]/lineArea[2]/text/@ipd"/>
  55. </checks>
  56. </testcase>