ICEpdf
  1. ICEpdf
  2. PDF-812

Embedded Type1 fonts are displayed too large

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.1.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      All

      Description

      In the provided PDF files, some of the font's are rendered too large and therefore causes them to be mashed together.

        Activity

        Hide
        Patrick Corless added a comment -

        I've done some testing with the OS release and Java seems to have trouble loading the embedded font but the layout is fine. This rules out a context token handling issue. I'm pretty sure something is going wrong when we attempt to parse the embedded type 1 font. My initial look didn't find any problems but I'll need to allocate more time and take a closer looks. There is likely something wrong with the fontMatrix specification.

        Show
        Patrick Corless added a comment - I've done some testing with the OS release and Java seems to have trouble loading the embedded font but the layout is fine. This rules out a context token handling issue. I'm pretty sure something is going wrong when we attempt to parse the embedded type 1 font. My initial look didn't find any problems but I'll need to allocate more time and take a closer looks. There is likely something wrong with the fontMatrix specification.
        Hide
        Judy Guglielmin added a comment -

        from comment on the support case:-
        I did some investigation on this issue and was able to locate the issue. In the initialization of instances of class NFontType1 the FontMatrix is getting lost. I could not tell the true reason for this but after the function readDICT was called, the correct font matrix is available. Once the setup() function is called, the dict_ variable only contains the default font matrix of [0.001 0 0 0.001 0 0]. if the values are set to the values received after readDICT(), the rendering is fine.

        Show
        Judy Guglielmin added a comment - from comment on the support case:- I did some investigation on this issue and was able to locate the issue. In the initialization of instances of class NFontType1 the FontMatrix is getting lost. I could not tell the true reason for this but after the function readDICT was called, the correct font matrix is available. Once the setup() function is called, the dict_ variable only contains the default font matrix of [0.001 0 0 0.001 0 0] . if the values are set to the values received after readDICT(), the rendering is fine.
        Hide
        Patrick Corless added a comment -

        It looks like the issue is related to the Type 1 CFF CID format and as a result we are getting the fontMatrix from the base dictionary (which has default assigned values) instead of the sub resoruce dictionary which has the corect fontMatrix data.

        Show
        Patrick Corless added a comment - It looks like the issue is related to the Type 1 CFF CID format and as a result we are getting the fontMatrix from the base dictionary (which has default assigned values) instead of the sub resoruce dictionary which has the corect fontMatrix data.
        Hide
        Patrick Corless added a comment -

        This fix looks promising but I'll need to run QA to be sure. There where a couple places in the setup() function where we didn't check for the CFF_CID format.

        Show
        Patrick Corless added a comment - This fix looks promising but I'll need to run QA to be sure. There where a couple places in the setup() function where we didn't check for the CFF_CID format.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: