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/04/07 17:26:00 UTC

[jira] [Commented] (PDFBOX-5154) Custom folder for fonts in FontMapper

    [ https://issues.apache.org/jira/browse/PDFBOX-5154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316518#comment-17316518 ] 

ASF subversion and git services commented on PDFBOX-5154:
---------------------------------------------------------

Commit 1888485 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1888485 ]

PDFBOX-5154: add path for CentOS

> Custom folder for fonts in FontMapper
> -------------------------------------
>
>                 Key: PDFBOX-5154
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5154
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: FontBox
>    Affects Versions: 2.0.23
>         Environment: CentOS
>            Reporter: Marco Scarpa
>            Priority: Minor
>              Labels: newbie
>             Fix For: 2.0.24, 3.0.0 PDFBox
>
>
> To find fonts the class that PDFBox uses is org.apache.pdfbox.pdmodel.font.FontMapper implemented by org.apache.pdfbox.pdmodel.font.FontMapperImpl and than going inside it uses org.apache.fontbox.util.autodetect.UnixFontDirFinder .
>  
> org.apache.fontbox.util.autodetect.UnixFontDirFinder searches fonts in some hard coded directories.
>  
> org.apache.pdfbox.pdmodel.font.FontMapperImpl is final and has default visibility so it's not visible from outside the package and can't be extended
>  
> org.apache.pdfbox.pdmodel.font.FontMapper does not show setProvider method of the implementation so it's not possible to plug a custom FontProvider.
>  
> Unfortunately CentOS puts fonts in /usr/share/X11/fonts/ that is not one of the specified folders of org.apache.fontbox.util.autodetect.UnixFontDirFinder .
>  
> There should be a way to overcome this problem, maybe using a custom FontProvider, maybe extending FontMapperImpl to allow to develop a version with a custom FontProvider or something else.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org