You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/10/20 20:17:27 UTC

[jira] [Comment Edited] (PDFBOX-3001) FileSystemFontProvider cache instability

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

Tilman Hausherr edited comment on PDFBOX-3001 at 10/20/15 6:16 PM:
-------------------------------------------------------------------

duplicate by [~adamhooper] in PDFBOX-3039:

FileSystemFontProvider: java.lang.IllegalArgumentException: Key too long: /usr/local/share/fonts/chromeos/notofonts-20140815/NotoSansGujaratiUI-Regular.ttf

{{FileSystemFontProvider}} calls {{Preferences.putByteArray()}}, which crashes if the key is longer than 80 characters.

Font filenames are often longer than 80 characters.

So FileSystemFontProvider often crashes. This happens even if I try to use {{PDType1Font.HELVETICA}} ... meaning PDFBox can't read or write PDFs on my system.


was (Author: tilman):
duplicate by [~adamhooper] in PDFBOX-3039:

{{FileSystemFontProvider}} calls {{Preferences.putByteArray()}}, which crashes if the key is longer than 80 characters.

Font filenames are often longer than 80 characters.

So FileSystemFontProvider often crashes. This happens even if I try to use {{PDType1Font.HELVETICA}} ... meaning PDFBox can't read or write PDFs on my system.

> FileSystemFontProvider cache instability
> ----------------------------------------
>
>                 Key: PDFBOX-3001
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3001
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>            Assignee: John Hewson
>
> FileSystemFontProvider uses Java's Preferences API to cache font metadata, however it doesn't seem to work out of the box on Windows (due to file permissions) and one user on the mailing list has complained that on Linux file paths with more than 80 characters can't be handed. Serializable is also slow.
> It looks like Preferences wasn't a good choice here. We're going to need to roll our own cache file format and save it somewhere we have write access to.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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