[
https://issues.apache.org/jira/browse/PDFBOX-6169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121147#comment-18121147
]
Philip Helger commented on PDFBOX-6169:
---------------------------------------
We encode text one code point at a time and cache the result per font.
When a code point can't be encoded, we swap in a fallback character instead of
failing the whole string.
The public `encode(String)` throws on the first character it can't map, so it
can't do this.
> Request to make PDFont.encode public
> ------------------------------------
>
> Key: PDFBOX-6169
> URL: https://issues.apache.org/jira/browse/PDFBOX-6169
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 3.0.6 PDFBox
> Reporter: Philip Helger
> Priority: Major
>
> Please make the following methods public:
> protected abstract byte[] encode(int unicode) throws IOException;
> I am using it in ph-pdf-layout for more efficient text rendering.
> To make sure the library works in a module-based environment, I need to get
> rid of the package-private override:
> [https://github.com/phax/ph-pdf-layout/issues/62]
> Thanks, Philip
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]