<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1132</bug_id>
          
          <creation_ts>2015-02-23 15:59:01 +0100</creation_ts>
          <short_desc>OTF fonts can&apos;t be loaded in Graph API renderer</short_desc>
          <delta_ts>2023-09-24 01:27:30 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>graph</component>
          <version>tbd</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>1064</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Alan Sambol">alan.zgb</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
    
    <cc>kdropucic</cc>
    
    <cc>rami.santina</cc>
    
    <cc>sgothel</cc>
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4594</commentid>
    <comment_count>0</comment_count>
    <who name="Alan Sambol">alan.zgb</who>
    <bug_when>2015-02-23 15:59:01 +0100</bug_when>
    <thetext>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.&lt;init&gt;(CffTable.java:202) 
        at jogamp.graph.font.typecast.ot.table.CffTable.&lt;init&gt;(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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4669</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-03-23 14:21:40 +0100</bug_when>
    <thetext>(In reply to comment #0)
&gt; When trying to load any font in OTF format the following exception is thrown:
&gt; 
&gt; java.lang.NegativeArraySizeException 
&gt;         at
&gt; jogamp.graph.font.typecast.ot.table.CffTable$Index.&lt;init&gt;(CffTable.java:202) 
&gt;         at
&gt; jogamp.graph.font.typecast.ot.table.CffTable.&lt;init&gt;(CffTable.java:525) 
&gt;         at
&gt; jogamp.graph.font.typecast.ot.table.TableFactory.create(TableFactory.java:
&gt; 87) 
&gt;         at jogamp.graph.font.typecast.ot.OTFont.read(OTFont.java:268) 
&gt;         at
&gt; jogamp.graph.font.typecast.ot.OTFontCollection.read(OTFontCollection.java:
&gt; 166) 
&gt;         at
&gt; jogamp.graph.font.typecast.ot.OTFontCollection.create(OTFontCollection.java:
&gt; 63) 
&gt;         at
&gt; jogamp.graph.font.typecast.TypecastFontConstructor$1.
&gt; run(TypecastFontConstructor.java:53) 
&gt;         at java.security.AccessController.doPrivileged(Native Method) 
&gt;         at
&gt; jogamp.graph.font.typecast.TypecastFontConstructor.
&gt; create(TypecastFontConstructor.java:48) 
&gt;         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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6873</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-09-24 01:27:30 +0200</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>