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)
(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
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.