Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1489

relative font-size (smaller/larger) does not work with percentages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.94
    • None
    • renderer/pdf
    • None
    • Operating System: Windows XP
      Platform: PC
    • 44343

    Description

      Error occurs in the combination of <fo:inline> of font-size="smaller"/"bigger"
      within <fo:block> of font-size in percentage. The error is "getBaselength
      called without context".

      <fo:block font-style="normal" font-size="80%" role="html:div"
      <fo:inline baseline-shift="super" font-size="smaller"
      role="html:sup">th</fo:inline>of each month.
      </fo:block>

      =====Original Post on fop-users mailing list===========
      On Feb 1, 2008, at 18:36, Li, Hao wrote:

      > You are right. The sample I posted actually works. I apologize not
      > recognizing the real problem. It is tricky and only occurs in the
      > combination of <fo:inline> of font-size="smaller"/"bigger" within
      > <fo:block> of font-size in percentage:

      OK, now I see it too.

      I'll run it through the debugger, but already think I know what is going on.
      The property resolution mechanism tries to resolve to smaller/larger font-
      sizes too early. Percentages are resolved (mostly
      anyway) during the layout-stage, where FOP tries to already resolve
      the "smaller" keyword long before that.

      I haven't tried yet, but using em's could also lead to trouble in combination
      with percentages, as in:

      <fo:block>
      <fo:block font-size="80%">
      <fo:inline font-size="8em">

      Will keep you posted.

      Cheers

      Andreas

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            lihao li hao
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: