ICEpdf
  1. ICEpdf
  2. PDF-526

Font substituted with wrong bracket

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 5.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Linux Red Hat 5.8, Mac 10.6.8
    • Salesforce Case Reference:

      Description

      Detailed analysis of bug provided by user:

      I have a PDF document that contains round brackets in Arial (non-embedded). After I converted the PDF to PNG image, I found that all closing round brackets ")" are replaced with opening brackets "(". For example, 123(4)5 would become 123(4(5.

      Since our system (Linux Red Hat 5.8) does not have the font Arial installed (only installed Arial MT), I turned on the FINEST log and found that ICEPdf used LucidaSans, which is installed in system, for font substitution.

      I found the below log in console:
      FINE: Font Substitution: Found java font: LucidaSans for named font Arial

      I also tested 2 individual PDF documents, both containing only LucidaSans font (one embedded and another non-embedded). I found that the embedded one worked fine while the non-embedded one was having this issue.

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment 12033.pdf [ 15511 ]
        Patrick Corless made changes -
        Fix Version/s 5.0.1 [ 10872 ]
        Patrick Corless made changes -
        Fix Version/s 5.1 [ 10675 ]
        Fix Version/s 5.0.1 [ 10872 ]
        Hide
        Patrick Corless added a comment -

        Added a system property org.icepdf.core.font.basefont that changes the base font name from lucidasans which is a Java Physical Font name. The name should be change to one of Java's logical font names:Dialog, DialogInput, Monospaced, Serif, SansSerif. The closest logical name that match LucidaSans is SansSerif.

        The default value is:

        -Dorg.icepdf.core.font.basefont=lucidasans;

        I would recommend using:

        -Dorg.icepdf.core.font.basefont=sansserif

        Show
        Patrick Corless added a comment - Added a system property org.icepdf.core.font.basefont that changes the base font name from lucidasans which is a Java Physical Font name. The name should be change to one of Java's logical font names:Dialog, DialogInput, Monospaced, Serif, SansSerif. The closest logical name that match LucidaSans is SansSerif. The default value is: -Dorg.icepdf.core.font.basefont=lucidasans; I would recommend using: -Dorg.icepdf.core.font.basefont=sansserif
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34788 Tue May 07 15:51:16 MDT 2013 patrick.corless PDF-526 added system property to override the base java physical font to a name other then lucidasans.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontManager.java
        Tyler Johnson made changes -
        Salesforce Case Reference 5007000000RWMPpAAP
        Patrick Corless made changes -
        Fix Version/s 5.0.1 [ 10872 ]
        Fix Version/s 5.1 [ 10675 ]
        Hide
        Patrick Corless added a comment -

        I did some testing on a Linux box that didn't have the Arial font and the system property -Dorg.icepdf.core.font.basefont=sansserif addressed the reversed bracket.

        There most be an encoding issue on Linux for the Lucidasans font.

        Show
        Patrick Corless added a comment - I did some testing on a Linux box that didn't have the Arial font and the system property -Dorg.icepdf.core.font.basefont=sansserif addressed the reversed bracket. There most be an encoding issue on Linux for the Lucidasans font.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: