ICEpdf
  1. ICEpdf
  2. PDF-256

Fonts not rendered correctly when JLP Diaper Pin used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      -
    • Workaround Exists:
      Yes
    • Workaround Description:
      Remove icepdf-viewer.jar but most are using the viewer.

      Description

      ALFor.pdf does not render correctly when the JLP Diaper Pin font library is installed. This issue only occurs when the icepdf-viewer.jar is on the classpath. With the JLR Diaper Fonts present the font substitution logging is as follows:

      Font Substitution: Found system font: TimesNewRomanPS-BoldMT for named font Times New Roman,Bold
      Font Substitution: Found system font: New for named font Times New Roman

      Full stack trace attached along with screen shots, PDF, and JLP Diaper Pin fonts which can be found here: http://www.fontspace.com/gorillablu/jlr-diaper-pin.


        Activity

        Hide
        Tyler Johnson added a comment -

        The necessary conditions to reproduce the problem on the customer´s Windows XP SP3 and Windows 7 are:

        1) Install the JLR Diaper Pin font in the Windows fonts directory.

        2) Run the attached sample code including icepdf-core.jar, icepdf-pro.jar, icepdf-pro-intl.jar, and icepdf-viewer.jar in the classpath.

        As you stated, removing the icepdf-viewer.jar from the classpath fixes the problem, but this is not an option for us.

        Show
        Tyler Johnson added a comment - The necessary conditions to reproduce the problem on the customer´s Windows XP SP3 and Windows 7 are: 1) Install the JLR Diaper Pin font in the Windows fonts directory. 2) Run the attached sample code including icepdf-core.jar, icepdf-pro.jar, icepdf-pro-intl.jar, and icepdf-viewer.jar in the classpath. As you stated, removing the icepdf-viewer.jar from the classpath fixes the problem, but this is not an option for us.
        Hide
        Tyler Johnson added a comment -

        The example in the test case folder does not have any references to icepdf-viewer.jar and helped narrow down the cause of the problem. The test case zip also has the PDF.

        Show
        Tyler Johnson added a comment - The example in the test case folder does not have any references to icepdf-viewer.jar and helped narrow down the cause of the problem. The test case zip also has the PDF.
        Hide
        Patrick Corless added a comment -

        I thought it looked pretty good with the new family font, oh well.

        The font in question gets stored as "new" as it's name and family which when compared to the lookup name "timesnewroman" produces a hit as the search is indexof based. I think a quick work around to the problem is to insure the fontList is always ordered. The reason the app work OK without the viewer jar is that there is no saving of system font data to map and to disk. The saving randomizes the list which produces mixed results.

        When the viewer jar is missing the fonts are always in order and the search work more reliably in for this strange test case. I don't see any major concerns with sorting the fontList values by font name. The side effect is that this corner case is resolved.

        Show
        Patrick Corless added a comment - I thought it looked pretty good with the new family font, oh well. The font in question gets stored as "new" as it's name and family which when compared to the lookup name "timesnewroman" produces a hit as the search is indexof based. I think a quick work around to the problem is to insure the fontList is always ordered. The reason the app work OK without the viewer jar is that there is no saving of system font data to map and to disk. The saving randomizes the list which produces mixed results. When the viewer jar is missing the fonts are always in order and the search work more reliably in for this strange test case. I don't see any major concerns with sorting the fontList values by font name. The side effect is that this corner case is resolved.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: