Bug 1132 - OTF fonts can't be loaded in Graph API renderer
Summary: OTF fonts can't be loaded in Graph API renderer
Status: RESOLVED WONTFIX
Alias: None
Product: Jogl
Classification: JogAmp
Component: graph (show other bugs)
Version: tbd
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: 2023-09-24 01:27 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
Comment 2 Sven Gothel 2023-09-24 01:27:30 CEST
Yes, even though I have updated our Typecast branch - it is not supported.

There exist an experimental branch https://github.com/haumacher/typecast/commits/documentation
addressing some of these issues, but not yet fully functional.

Hence I put this as WONTFIX for now as TTF is OK for now.
We may revisit this if interest (and contracts) come up.