[ 
https://issues.apache.org/jira/browse/PDFBOX-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elmar Chen updated PDFBOX-1302:
-------------------------------

    Attachment: 金梅毛行书.TTF

the file was parsed.
                
> 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
>            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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to