Bug 1132 - OTF fonts can't be loaded in Graph API renderer
Summary: OTF fonts can't be loaded in Graph API renderer
Status: UNCONFIRMED
Alias: None
Product: Jogl
Classification: JogAmp
Component: graph (show other bugs)
Version: 2.4.0
Hardware: All all
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1064
  Show dependency treegraph
 
Reported: 2015-02-23 15:59 CET by Alan Sambol
Modified: 2015-10-01 10:00 CEST (History)
4 users (show)

See Also:
Type: FEATURE
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Sambol 2015-02-23 15:59:01 CET
When trying to load any font in OTF format the following exception is thrown:

java.lang.NegativeArraySizeException 
        at jogamp.graph.font.typecast.ot.table.CffTable$Index.<init>(CffTable.java:202) 
        at jogamp.graph.font.typecast.ot.table.CffTable.<init>(CffTable.java:525) 
        at jogamp.graph.font.typecast.ot.table.TableFactory.create(TableFactory.java:87) 
        at jogamp.graph.font.typecast.ot.OTFont.read(OTFont.java:268) 
        at jogamp.graph.font.typecast.ot.OTFontCollection.read(OTFontCollection.java:166) 
        at jogamp.graph.font.typecast.ot.OTFontCollection.create(OTFontCollection.java:63) 
        at jogamp.graph.font.typecast.TypecastFontConstructor$1.run(TypecastFontConstructor.java:53) 
        at java.security.AccessController.doPrivileged(Native Method) 
        at jogamp.graph.font.typecast.TypecastFontConstructor.create(TypecastFontConstructor.java:48) 
        at com.jogamp.graph.font.FontFactory.get(FontFactory.java:91)
Comment 1 Julien Gouesse 2015-03-23 14:21:40 CET
(In reply to comment #0)
> When trying to load any font in OTF format the following exception is thrown:
> 
> java.lang.NegativeArraySizeException 
>         at
> jogamp.graph.font.typecast.ot.table.CffTable$Index.<init>(CffTable.java:202) 
>         at
> jogamp.graph.font.typecast.ot.table.CffTable.<init>(CffTable.java:525) 
>         at
> jogamp.graph.font.typecast.ot.table.TableFactory.create(TableFactory.java:
> 87) 
>         at jogamp.graph.font.typecast.ot.OTFont.read(OTFont.java:268) 
>         at
> jogamp.graph.font.typecast.ot.OTFontCollection.read(OTFontCollection.java:
> 166) 
>         at
> jogamp.graph.font.typecast.ot.OTFontCollection.create(OTFontCollection.java:
> 63) 
>         at
> jogamp.graph.font.typecast.TypecastFontConstructor$1.
> run(TypecastFontConstructor.java:53) 
>         at java.security.AccessController.doPrivileged(Native Method) 
>         at
> jogamp.graph.font.typecast.TypecastFontConstructor.
> create(TypecastFontConstructor.java:48) 
>         at com.jogamp.graph.font.FontFactory.get(FontFactory.java:91)

Look at the very last offset read here: https://github.com/sgothel/jogl/blob/master/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java#L200