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

Acrobat Reader error with Google Noto Sans CJK fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1
    • None
    • font/opentype
    • None
    • Operating Systems: Windows
      Platform: PC

    Description

      This is a followup to https://issues.apache.org/jira/browse/FOP-2491
      Symptom: when opening the PDF file generated by FOP 2.1, depending on the font weight, the Acrobat Reader has the following issues:
      1. some characters are not well aligned with others in the same line horizontally
      2. it reports "cannot extract the embedded font 'EAAAAB+NotoSansCJKSC'. Some characters may not display or print correctly". Some characters are missing on the PDF.

      How to repeat:
      1. Get FOP 2.1 library.
      2. Get Google-Noto-Sans from https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKTC-hinted.zip.
      3. Set the fop.xconf as following:
      <fonts>
      <directory recursive="true">.</directory>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Black.otf" >
      <font-triplet name="Noto Sans CJK SC Black" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Bold.otf" >
      <font-triplet name="Noto Sans CJK SC Bold" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-DemiLight.otf" >
      <font-triplet name="Noto Sans CJK SC DemiLight" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Light.otf" >
      <font-triplet name="Noto Sans CJK SC Light" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Medium.otf" >
      <font-triplet name="Noto Sans CJK SC Medium" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Regular.otf" >
      <font-triplet name="Noto Sans CJK SC Regular" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKsc-Thin.otf" >
      <font-triplet name="Noto Sans CJK SC Thin" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Black.otf" >
      <font-triplet name="Noto Sans CJK TC Black" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Bold.otf" >
      <font-triplet name="Noto Sans CJK TC Bold" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-DemiLight.otf" >
      <font-triplet name="Noto Sans CJK TC DemiLight" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Light.otf" >
      <font-triplet name="Noto Sans CJK TC Light" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Medium.otf" >
      <font-triplet name="Noto Sans CJK TC Medium" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Regular.otf" >
      <font-triplet name="Noto Sans CJK TC Regular" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKtc-Thin.otf" >
      <font-triplet name="Noto Sans CJK TC Thin" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Black.otf" >
      <font-triplet name="Noto Sans CJK JP Black" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Bold.otf" >
      <font-triplet name="Noto Sans CJK JP Bold" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-DemiLight.otf" >
      <font-triplet name="Noto Sans CJK JP DemiLight" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Light.otf" >
      <font-triplet name="Noto Sans CJK JP Light" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Medium.otf" >
      <font-triplet name="Noto Sans CJK JP Medium" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Regular.otf" >
      <font-triplet name="Noto Sans CJK JP Regular" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKjp-Thin.otf" >
      <font-triplet name="Noto Sans CJK JP Thin" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Black.otf" >
      <font-triplet name="Noto Sans CJK KR Black" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Bold.otf" >
      <font-triplet name="Noto Sans CJK KR Bold" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-DemiLight.otf" >
      <font-triplet name="Noto Sans CJK KR DemiLight" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Light.otf" >
      <font-triplet name="Noto Sans CJK KR Light" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Medium.otf" >
      <font-triplet name="Noto Sans CJK KR Medium" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Regular.otf" >
      <font-triplet name="Noto Sans CJK KR Regular" style="normal" weight="normal" />
      </font>
      <font kerning="yes" embed-url="Noto_Sans/NotoSansCJKkr-Thin.otf" >
      <font-triplet name="Noto Sans CJK KR Thin" style="normal" weight="normal" />
      </font>
      </fonts>
      4. Get the attached testNoto.fo file. Note that it uses 4 fonts. Update the font name accordingly for Thin, Light, DemiLight, Regular, Medium, Bold and Black.
      5. Generate the PDFs. There is no error reported.
      6. Open the PDF files in Acrobat Reader. It has different output depending on the font weight:
      Thin: Good

      Light: cannot extract the embedded font 'EAAAAA+NotoSansCJKSC'. Some characters may not display or print correctly.The characters not printed:

      • Simplified Chinese: 界, 懒
      • Traditional Chinese: 界, 棕
      • Japanese: 界

      DemiLight: cannot extract the embedded font 'EAAAAC+NotoSansCJKSC'. Some characters may not display or print correctly. The characters not printed:

      • Simplified Chinese: 界, 懒
      • Traditional Chinese: 界, 棕
      • Japanese: 新, 界

      Regular: some characters are not well aligned horizontally with others in the same line:

      • Simplified Chinese: 界
      • Traditional Chinese: 界, 棕
      • Japanese: 新, 界

      Medium: cannot extract the embedded font 'EAAAAA+NotoSansCJKSC'. Some characters may not display or print correctly.The characters not printed:

      • Simplified Chinese: 懒
      • Traditional Chinese: 棕

      Bold: cannot extract the embedded font 'EAAAAC+NotoSansCJKSC'. Some characters may not display or print correctly.The characters not printed:

      • Simplified Chinese: 跳 , 懒
      • Traditional Chinese: 棕, 跳
      • Japanese: 茶

      Black: cannot extract the embedded font 'EAAAAB+NotoSansCJKSC'. Some characters may not display or print correctly.The characters not printed:

      • Simplified Chinese: 界, 跳
      • Traditional Chinese: 界, 棕, 跳
      • Japanese: 界, 茶

      If with embedding-mode="full", there is no issue in the generated PDF document however the file is huge (about 55MB). A lean solution is still wanted.

      Attachments

        1. testNoto_Thin.pdf
          38 kB
          Hua Lan
        2. testNoto_Regular.pdf
          39 kB
          Hua Lan
        3. testNoto_Medium.pdf
          39 kB
          Hua Lan
        4. testNoto_Light.pdf
          38 kB
          Hua Lan
        5. testNoto_DemiLight.pdf
          39 kB
          Hua Lan
        6. testNoto_Bold.pdf
          39 kB
          Hua Lan
        7. testNoto_Black.pdf
          39 kB
          Hua Lan
        8. testNoto.fo
          6 kB
          Hua Lan

        Issue Links

          Activity

            People

              ssteiner Simon Steiner
              busbby Hua Lan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 336h
                  336h
                  Remaining:
                  Remaining Estimate - 336h
                  336h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified