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.

inline_dominant-baseline_3.xml 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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 inline level dominant-baseline.
  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 background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt">
  33. Before
  34. <fo:inline font-size="50%"
  35. dominant-baseline="central"
  36. background-color="yellow">central
  37. <fo:inline font-size="50%"
  38. background-color="red">Baseline changed</fo:inline>
  39. </fo:inline>
  40. After
  41. </fo:block>
  42. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt">
  43. Before
  44. <fo:inline font-size="50%"
  45. dominant-baseline="text-before-edge"
  46. background-color="yellow">text-before-edge
  47. <fo:inline font-size="50%"
  48. background-color="red">Baseline changed</fo:inline>
  49. </fo:inline>
  50. After
  51. </fo:block>
  52. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt">
  53. Before
  54. <fo:inline font-size="50%"
  55. dominant-baseline="text-after-edge"
  56. background-color="yellow">text-after-edge
  57. <fo:inline font-size="150%"
  58. background-color="red">Baseline changed</fo:inline>
  59. </fo:inline>
  60. After
  61. </fo:block>
  62. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt">
  63. Before
  64. <fo:inline font-size="50%"
  65. dominant-baseline="middle"
  66. background-color="yellow">middle
  67. <fo:inline font-size="150%"
  68. dominant-baseline="hanging"
  69. background-color="red">hanging
  70. <fo:inline font-size="75%"
  71. background-color="green">Baseline changed
  72. </fo:inline>
  73. </fo:inline>
  74. </fo:inline>
  75. After
  76. </fo:block>
  77. </fo:flow>
  78. </fo:page-sequence>
  79. </fo:root>
  80. </fo>
  81. <checks>
  82. <eval expected="14800" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
  83. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
  84. <eval expected="5744" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
  85. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
  86. <eval expected="1850" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  87. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  88. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
  89. <eval expected="14800" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
  90. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
  91. <eval expected="5744" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
  92. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/>
  93. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  94. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  95. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
  96. <eval expected="14800" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
  97. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
  98. <eval expected="5744" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
  99. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
  100. <eval expected="-3700" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  101. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  102. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
  103. <eval expected="15018" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
  104. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
  105. <eval expected="5744" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
  106. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
  107. <eval expected="-1826" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  108. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  109. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
  110. </checks>
  111. </testcase>