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

[PATCH] ToUnicode table for subset font contains invalid entries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 1.0
    • None
    • font/unqualified
    • Operating System: Linux
      Platform: All
    • 51144

    Description

      In the ToUnicode table that maps character codes from a subset font to unicode characters, the first three entries map to unicode <ffff>. The first one is the .notdef glyph, so this is OK, but the following two might be incorrect.

      This is the beginning of such a table:

      21 beginbfchar
      <0000> <ffff>
      <0001> <ffff>
      <0002> <ffff>
      <0003> <002d>
      <0004> <0031>

      I posted a question on the fop-users mailing list on 2 may 2011. Mehdi Houshmand replied on 3 may 2011:

      Yes this is a bug, which has been fixed in my patch, but since I
      didn't think anyone else had bumped into it I didn't want to put it
      into trunk since I also made some code improvements to the class and
      was weary that it could cause merge issues when/if the branches are
      merged.

      The issue is that in most fonts the first 3 glyphs are set to .notdef,
      and this was implemented in FOP. However, the spec says only the first
      glyph is reserved for .notdef, and what happens in MOST fonts doesn't
      happen in ALL fonts.

      Attachments

        1. bug51144.patch
          2 kB
          Mehdi Houshmand

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            r.grosmann@gmail.com r.grosmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: