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

John Hewson commented on PDFBOX-2144:
-------------------------------------

{quote}
The new FontProvider interface has separate methods for substitution of ttf, 
cff and type 1 fonts. Is it so that a PDF references an external type 1 font 
and I have to provide a type 1 font then?
{quote}

Yes, it allows you to substitute the exact missing font format, but your 
FontProvider is free to return null if that format is not available.

{quote}
Or is this used just when creating PDFs and the normal way of getting an 
external font for rendering is ExternalFonts.getType1EquivalentFont() which can 
return any of the flavors?
{quote}

The getType1EquivalentFont() method is called to find a suitable font for 
rendering if the previous calls to fetch format-specific fonts all returned 
null. This allows us to have similar behaviour to AWT where we could substitute 
TTF fonts in place of missing Type 1 fonts.

Regarding the static configuration, what aspects of the configuration were you 
expecting to change while PDFs are being processed? Are you talking about using 
a specific FontProvider for a given PDF? If so why? This is certainly something 
we could think about if I can get my head around the use case.


> Provide a pluggable font manager
> --------------------------------
>
>                 Key: PDFBOX-2144
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2144
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>            Reporter: Petr Slaby
>         Attachments: FontManager.patch
>
>
> Our J2EE application has all fonts and resources configured and stored in its 
> database. No files are accessed directly from file system or from system 
> environment. To make PDFBox compatible with this philosophy, we need the 
> FontManager in pdfbox and fontbox to be pluggable, e.g. as shown in the 
> attached patch.
> The proposal defines a FontManager interface and default implementation which 
> is the original one. FontManager then needs to be configured on and 
> propagated from PDFStreamEngine and PageDrawer. It should also be 
> configurable on PDFRenderer, which is not shown in the patch. There I would 
> suggest to introduce a configuration object which would take care about all 
> the current and future options of PDFRenderer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to