Some TTF / OTF fonts not working in the new graph API renderer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Some TTF / OTF fonts not working in the new graph API renderer

asambol
I downloaded the play fonts from here http://www.fontsquirrel.com/fonts/play in TTF format.

The bold one works fine, but the regular one can't find any glyphs when trying to draw:

 java.lang.RuntimeException: Could not retrieve glyph for symbol: <T> 84 -> glyph id 0
        at jogamp.graph.font.typecast.TypecastFont.getGlyph(TypecastFont.java:200)
        at com.jogamp.graph.curve.opengl.TextRegionUtil.processString(TextRegionUtil.java:123)
        at com.jogamp.graph.curve.opengl.TextRegionUtil.addStringToRegion(TextRegionUtil.java:153)
        at com.jogamp.graph.curve.opengl.TextRegionUtil.drawString3D(TextRegionUtil.java:182)

I tried converting it to OTF format using online converters, then realised none of my OTF fonts work - they can't be loaded at all:
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)

Another problem with some fonts, for example Armata-Regular from Google Fonts: http://www.google.com/fonts#UsePlace:use/Collection:Armata (download in top right corner) - whichever text I try to render, I get square characters instead of real text.

Is there anything I'm doing wrong? Is there a specific Font converter to make sure they work in Jogl?
Reply | Threaded
Open this post in threaded view
|

Re: Some TTF / OTF fonts not working in the new graph API renderer

Sven Gothel
Administrator
On 11/29/2014 11:58 AM, asambol [via jogamp] wrote:

> I downloaded the play fonts from here
> http://www.fontsquirrel.com/fonts/play in TTF format.
>
> The bold one works fine, but the regular one can't find any glyphs when trying
> to draw:
>
>  java.lang.RuntimeException: Could not retrieve glyph for symbol: <T> 84 ->
> glyph id 0
>         at
> jogamp.graph.font.typecast.TypecastFont.getGlyph(TypecastFont.java:200)
>         at
> com.jogamp.graph.curve.opengl.TextRegionUtil.processString(TextRegionUtil.java:123)
<snip>

>
>
> I tried converting it to OTF format using online converters, then realised
> none of my OTF fonts work - they can't be loaded at all:
> 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
<snip>

Seems we have an OTF bug in typecast .. hmm.
Pls file a bug report, even though this will have lowest prio for now.

>
> Another problem with some fonts, for example Armata-Regular from Google Fonts:
> http://www.google.com/fonts#UsePlace:use/Collection:Armata (download in top
> right corner) - whichever text I try to render, I get square characters
> instead of real text.

That seems to be a UTF/glyph-index issue then, maybe another bug report.

Please make both new bugs depend on the existing font holding bug:
<https://jogamp.org/bugzilla/show_bug.cgi?id=1064>

See
<https://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.3.0#Graph_Font_Rendering>


signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Some TTF / OTF fonts not working in the new graph API renderer

Sven Gothel
Administrator
In reply to this post by asambol
On 11/30/2014 10:59 AM, Sven Gothel wrote:
...
>
> Please make both new bugs depend on the existing font holding bug:
> <https://jogamp.org/bugzilla/show_bug.cgi?id=1064>
>
> See
> <https://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.3.0#Graph_Font_Rendering>
>

You are more than welcome to [help] fix[ing] those issues of course!

~Sven


signature.asc (828 bytes) Download Attachment