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

[PATCH] ToUnicode table for subset font contains invalid entries


    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: font/unqualified
    • Labels:
    • Environment:
      Operating System: Linux
      Platform: All
    • External issue ID:


      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

      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.


        1. bug51144.patch
          2 kB
          Mehdi Houshmand



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


              • Created: