You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/12/21 02:56:00 UTC
[jira] [Commented] (PDFBOX-5348) FontMapper should also take into account the user's font directory on Windows operating systems
[ https://issues.apache.org/jira/browse/PDFBOX-5348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462949#comment-17462949 ]
ASF subversion and git services commented on PDFBOX-5348:
---------------------------------------------------------
Commit 1896208 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1896208 ]
PDFBOX-5348: add users font directory, as suggested by Daniel Fischer
> FontMapper should also take into account the user's font directory on Windows operating systems
> -----------------------------------------------------------------------------------------------
>
> Key: PDFBOX-5348
> URL: https://issues.apache.org/jira/browse/PDFBOX-5348
> Project: PDFBox
> Issue Type: Improvement
> Components: FontBox
> Affects Versions: 2.0.25
> Environment: Windows 10 on x86-64
> Reporter: Daniel Fischer
> Priority: Minor
> Labels: fontbox
>
> If you install a new font on a windows OS you can do that in two ways (e.g. from within the Windows Explorer:
> # For all users.
> # 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|https://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java?view=markup] ?
> Interestingly on [Unix-like OSes the user's home font folder is taken into account|https://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/UnixFontDirFinder.java?revision=1888485&view=markup#l35].
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org