You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/12/31 15:47:09 UTC
[jira] [Comment Edited] (PDFBOX-1302) Got
ArrayIndexOutOfBoundsException in parsing a Chinese ttf file.
[ https://issues.apache.org/jira/browse/PDFBOX-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859504#comment-13859504 ]
Andreas Lehmkühler edited comment on PDFBOX-1302 at 12/31/13 2:45 PM:
----------------------------------------------------------------------
The issue was solved with PDFBOX-490 (revision 1506164). I'll check if I can backport the fix for the CMap format 2 issue
was (Author: lehmi):
The issue was solved with PDFBOX-490 (revision 1444400). I'll check if I can backport the fix for the CMap format 2 issue
> Got ArrayIndexOutOfBoundsException in parsing a Chinese ttf file.
> -----------------------------------------------------------------
>
> Key: PDFBOX-1302
> URL: https://issues.apache.org/jira/browse/PDFBOX-1302
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 1.6.0
> Reporter: Elmar Chen
> Assignee: Andreas Lehmkühler
> Priority: Minor
> Attachments: 金梅毛行书.TTF
>
>
> using this code to parse the ttf file:
> public static void main(String[] args) throws IOException {
> TTFParser parser = new TTFParser();
> TrueTypeFont font = parser.parseTTF("C:\\workspace\\downloader\\pdf\\金梅毛行书.TTF");
> System.out.println("Font:" + font);
> }
> got exception with stacktrace:
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 41280
> at org.apache.fontbox.ttf.CMAPEncodingEntry.processSubtype2(CMAPEncodingEntry.java:429)
> at org.apache.fontbox.ttf.CMAPEncodingEntry.initSubtable(CMAPEncodingEntry.java:82)
> at org.apache.fontbox.ttf.CMAPTable.initData(CMAPTable.java:90)
> at org.apache.fontbox.ttf.AbstractTTFParser.parseTables(AbstractTTFParser.java:163)
> at org.apache.fontbox.ttf.TTFParser.parseTables(TTFParser.java:61)
> at org.apache.fontbox.ttf.AbstractTTFParser.parseTTF(AbstractTTFParser.java:90)
> at org.apache.fontbox.ttf.TTFParser.parseTTF(TTFParser.java:26)
> at org.apache.fontbox.ttf.AbstractTTFParser.parseTTF(AbstractTTFParser.java:43)
> at org.apache.fontbox.ttf.TTFParser.parseTTF(TTFParser.java:26)
> at elmar.demo.TFFTest.main(TFFTest.java:11)
>
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)