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

Acrobat Reader error with Adobe Kozuka Mincho font

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: font/opentype
    • Labels:
      None
    • Environment:
      Operating Systems: Windows
      JDK: 1.8
      OpenFont: Adobe Kozuka Mincho

      Description

      The Kozuka Mincho Pr6N R font cannot be embedded into PDF document.

      How to repeat
      1. Get FOP from trunk@1784735
      2. Install Adobe Acrobat Reader DC Japanese language version.
      3. Get Font from C:\Program Files (x86)\Adobe\Acrobat DC\Resource\CIDFont\KozMinPr6N-Regular.otf
      4. Use my config file and generate the PDF, there is no error reported.
      5. Open the PDF file in Acro-Reader, it will report the "cannot extract the embedded font" error.

      Notes
      1. When use the Noto Sans CJK JP and Kozuka Gothic Pr6N M fonts, there is no problem.
      2. But NfMotoya Cedar Std W1 (Free Font, Regisration needed) and Morisawa A-OTF Shin Go Pro R are failed.
      3. Read embedded stream by CFFParser, test_NotoSansCJKjp.pdf is ok, test_KozukaMinchoPr6NR.pdf is failed at reading CharStringIndex.
      java.io.EOFException
      at org.apache.fontbox.cff.DataInput.readUnsignedShort(DataInput.java:151)
      at org.apache.fontbox.cff.CFFDataInput.readCard16(CFFDataInput.java:55)
      at org.apache.fontbox.cff.CFFParser.readIndexDataOffsets(CFFParser.java:172)
      at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:193)
      at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:456)
      at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:141)

      CFFParser#parseFont()
      // charstrings index
      DictData.Entry charStringsEntry = topDict.getEntry("CharStrings");
      int charStringsOffset = charStringsEntry.getNumber(0).intValue(); // THIS VALUE IS NEGATIVE!!
      input.setPosition(charStringsOffset);
      byte[][] charStringsIndex = readIndexData(input);

        Attachments

        1. test3_subset.pdf
          7 kB
          Kazuyuki Murakami
        2. test3_full.pdf
          2.71 MB
          Kazuyuki Murakami
        3. test3.fo
          0.5 kB
          Kazuyuki Murakami
        4. fop.xconf
          0.9 kB
          Kazuyuki Murakami
        5. test2.fo
          39 kB
          Kazuyuki Murakami
        6. test_KozukaMinchoPr6NR.pdf
          87 kB
          Kazuyuki Murakami
        7. test_NotoSansCJKjp.pdf
          75 kB
          Kazuyuki Murakami
        8. test.fo
          1 kB
          Kazuyuki Murakami
        9. fop.xconf
          0.6 kB
          Kazuyuki Murakami

          Activity

            People

            • Assignee:
              ssteiner1 simon steiner
              Reporter:
              murakami@brainsellers.com Kazuyuki Murakami
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: