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

FontMapper should also take into account the user's font directory on Windows operating systems

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.25
    • 2.0.26, 3.0.0 PDFBox
    • FontBox
    • Windows 10 on x86-64

    Description

      If you install a new font on a windows OS you can do that in two ways (e.g. from within the Windows Explorer:

      1. For all users.
      2. Only for the logged in user.

      Option 1 installs the font into directory %windir%\fonts .

      Option 2 installs it into directory %LOCALAPPDATA%\Microsoft\Windows\Fonts of the current user.

      If I use Option 2 for font installation, the FontMapper can not find the font and guesses a fallback font.
      I use the FontMapper like that:
      final FontMapping<FontBoxFont> firstMapping = FontMappers.instance().getFontBoxFont(pFontName, null);

       

      After debugging IMHO option 2 should be added to the Windows Font autodetection  org.apache.fontbox.util.autodetect.WindowsFontDirFinder ?

      Interestingly on Unix-like OSes the user's home font folder is taken into account.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            iq-df Daniel Fischer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: