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.

marker_font-size.xml 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 markers and font-size inheritance.
  21. This is currently incorrectly handled in that for relative font sizes
  22. the base value of the fo:marker context is used and not the font size
  23. from the fo:retrieve-marker context.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  30. <fo:region-body margin-top="1in" margin-bottom="1in"/>
  31. <fo:region-before extent="1in"/>
  32. <fo:region-after extent="1in"/>
  33. </fo:simple-page-master>
  34. </fo:layout-master-set>
  35. <fo:page-sequence master-reference="normal">
  36. <fo:static-content flow-name="xsl-region-before">
  37. <fo:block background-color="yellow" font-size="16pt">
  38. 1. Marker <fo:retrieve-marker retrieve-class-name="m1"
  39. retrieve-boundary="page"
  40. retrieve-position="first-starting-within-page" />
  41. </fo:block>
  42. </fo:static-content>
  43. <fo:static-content flow-name="xsl-region-after">
  44. <fo:block background-color="yellow" font-size="10pt">
  45. 2. Marker <fo:retrieve-marker retrieve-class-name="m2" />
  46. </fo:block>
  47. </fo:static-content>
  48. <fo:flow flow-name="xsl-region-body">
  49. <fo:block background-color="red">
  50. <fo:marker marker-class-name="m1">
  51. <fo:block font-size=".5em">
  52. First marker with small font
  53. </fo:block>
  54. </fo:marker>
  55. </fo:block>
  56. <fo:block background-color="green">
  57. <fo:marker marker-class-name="m2">
  58. <fo:block font-size="2em">
  59. Second marker big font
  60. </fo:block>
  61. </fo:marker>
  62. </fo:block>
  63. </fo:flow>
  64. </fo:page-sequence>
  65. </fo:root>
  66. </fo>
  67. <checks>
  68. <!-- font-size relative to the retrieve-marker context? -->
  69. <eval expected="8000" xpath="//regionBefore/block[1]/block/lineArea/text/@font-size"/>
  70. <eval expected="20000" xpath="//regionAfter/block[1]/block/lineArea/text/@font-size"/>
  71. </checks>
  72. </testcase>