Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-516

Font Manager does not always find correct font from environment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0-incubator
    • 0.8.0-incubator
    • PDModel
    • None
    • Java

    Description

      The FontManager.java class does not identify fonts found in PDFs correctly when matching against those loaded from environment (possibly also effects mappings and externaly loaded fonts but I did not check for this).

      Some PDFs include fonts using Postscript (PS) names these will typicaly include "PS" somewhere in the name, and other notation such as "MT". When the environment based fonts are loaded only the font family name is used plus any styles. To fix this the lookup should also include the PS name which can be retrieved from AWT fonts easily. The attached patch (FontManager.diff) includes a very simple change to facilitate this.

      Attachments

        1. FontManager.diff
          0.4 kB
          Antony Scerri

        Activity

          People

            Unassigned Unassigned
            antonyscerri Antony Scerri
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: