You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2013/03/21 07:49:15 UTC
[jira] [Resolved] (PDFBOX-1335) ArrayIndexOutOfBoundsException
while loading ttf font
[ https://issues.apache.org/jira/browse/PDFBOX-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maruan Sahyoun resolved PDFBOX-1335.
------------------------------------
Resolution: Fixed
Testing
PDDocument document = new PDDocument();
PDFont font = PDTrueTypeFont.loadTTF(document, "OpenSans-Regular.ttf" );
System.out.println(font.getFontDescriptor().getFontFamily());
with pdfbox-1.7.0 I was able to replicate the error message.
Doing the same with pdfbox-1.8.0 the error message is gone and the font family is correctly printed as 'Open Sans'.
Closing the issue.
> ArrayIndexOutOfBoundsException while loading ttf font
> -----------------------------------------------------
>
> Key: PDFBOX-1335
> URL: https://issues.apache.org/jira/browse/PDFBOX-1335
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.7.0
> Reporter: Mirek Hankus
> Fix For: 1.8.0
>
>
> While loading TTF font I'm getting exception (below). That font is OpenSans-Regular.ttf from http://www.google.com/webfonts
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 931
> at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:360)
> at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:166)
> at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:142)
> at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:129)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira