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

[PATCH] Possible bug in PSTextRenderer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Won't Fix
    • 2.5
    • None
    • renderer/ps
    • None
    • Operating System: Linux
      Platform: PC
    • 40529

    Description

      According to the comment, this class

      • Renders the attributed character iterator of a <tt>TextNode</tt>.
      • This class draws the text directly into the PSGraphics2D so that
      • the text is not drawn using shapes which makes the PS files larger.
      • If the text is simple enough to draw then it sets the font and calls
      • drawString. If the text is complex or the cannot be translated
      • into a simple drawString the StrokingTextPainter is used instead.

      However,
      The check for unsupported glyphs seems always to use the default font,
      When makeFont is called the ACI should be initialized using aci.first(),
      otherwise the position is undefined, the attributes (including font)
      are therefore null, and the default font is used instead.

      This bug seems to be masked in my case since the embedded SVG document I am
      rendering has other unsupported attributes so the text has to be stroked
      anyway. However, in the course of debugging I came across this and thought
      I should mention it.

      Could someone who understands this font handling see if this patch is
      reasonable:

      acro

      Attachments

        1. fop-svn-unsupported.patch
          0.8 kB
          Peter Wainwright

        Issue Links

          Activity

            People

              fop-dev@xmlgraphics.apache.org fop-dev
              peter.wainwright@ieee.org Peter Wainwright
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: