Missing file in text demo's

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

Missing file in text demo's

Dispatch
Hi,

While trying out test rendering I noticed that the demos com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01 and com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02 are looking for a font file that is not there.

java.io.IOException: Problem loading font Ubuntu-R.ttf, stream fonts/ubuntu/Ubuntu-R.ttf
        at jogamp.graph.font.UbuntuFontLoader.abspath(UbuntuFontLoader.java:171)
        at jogamp.graph.font.UbuntuFontLoader.get(UbuntuFontLoader.java:110)
        at jogamp.graph.font.UbuntuFontLoader.getDefault(UbuntuFontLoader.java:87)
        at com.jogamp.opengl.test.junit.graph.demos.GPUTextRendererListenerBase01.<init>(GPUTextRendererListenerBase01.java:105)
        at com.jogamp.opengl.test.junit.graph.demos.GPUTextGLListener0A.<init>(GPUTextGLListener0A.java:47)
        at com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02.main(GPUTextNewtDemo02.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Adding the directory and font file to the current working directory fixes the problem. Btw, I am trying this under Lubuntu.

Cheers,

Rien
Reply | Threaded
Open this post in threaded view
|

Re: Missing file in text demo's

Sven Gothel
Administrator
On 01/19/2014 12:57 PM, Dispatch [via jogamp] wrote:
> Hi,
>
> While trying out test rendering I noticed that the demos
> com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01 and
> com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02 are looking for a
> font file that is not there.

Lately we have moved the fonts outside of
  jar/jogl-all.jar
to
  jar/atomic/jogl-fonts-p0.jar

See:

src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java:
   private static final String jarName = "jogl-fonts-p0.jar" ;

Explicit: jnlp-files/jogl-applet-runner-newt-GraphTextDemo01b-napplet.html
  jar/atomic/jogl-fonts-p0.jar

Implicit: jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
  i.e. loads 'jar/atomic/jogl-fonts-p0.jar' from same location as class files.

~Sven



signature.asc (911 bytes) Download Attachment