aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/FontSet01.java16
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java15
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java2
3 files changed, 23 insertions, 10 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/FontSet01.java b/src/test/com/jogamp/opengl/test/junit/graph/FontSet01.java
index 03a00af78..0666ec4db 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/FontSet01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/FontSet01.java
@@ -15,21 +15,21 @@ public class FontSet01 {
fonts[i++] = FontFactory.get(FontFactory.UBUNTU).get(FontSet.FAMILY_REGULAR, FontSet.STYLE_ITALIC);
fonts[i++] = FontFactory.get(FontFactory.UBUNTU).get(FontSet.FAMILY_REGULAR, FontSet.STYLE_BOLD);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeMono.ttf"));
+ "fonts/freefont/FreeMono.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeMonoBold.ttf"));
+ "fonts/freefont/FreeMonoBold.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSans.ttf"));
+ "fonts/freefont/FreeSans.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSansBold.ttf"));
+ "fonts/freefont/FreeSansBold.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSerif.ttf"));
+ "fonts/freefont/FreeSerif.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSerifBold.ttf"));
+ "fonts/freefont/FreeSerifBold.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSerifBoldItalic.ttf"));
+ "fonts/freefont/FreeSerifBoldItalic.ttf").getInputStream(), true);
fonts[i++] = FontFactory.get(IOUtil.getResource(TestTextRendererNEWTBugXXXX.class,
- "fonts/freefont/FreeSerifItalic.ttf"));
+ "fonts/freefont/FreeSerifItalic.ttf").getInputStream(), true);
return fonts;
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
index 3a561eda4..2f67466a9 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
@@ -29,6 +29,7 @@ package com.jogamp.opengl.test.junit.graph;
import java.io.File;
import java.io.IOException;
+import java.net.URL;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES2;
@@ -75,6 +76,7 @@ public class TestTextRendererNEWT00 extends UITestCase {
static int SwapInterval = 0;
static String fontFileName = null;
+ static URL fontURL = null;
static int fontSet = 0;
static int fontFamily = 0;
static int fontStylebits = 0;
@@ -92,6 +94,9 @@ public class TestTextRendererNEWT00 extends UITestCase {
if(args[i].equals("-time")) {
i++;
Duration = atoi(args[i]);
+ } else if(args[i].equals("-fontURL")) {
+ i++;
+ fontURL = new URL(args[i]);
} else if(args[i].equals("-fontFile")) {
i++;
fontFileName = args[i];
@@ -279,7 +284,15 @@ public class TestTextRendererNEWT00 extends UITestCase {
regionFPS = GLRegion.create(renderModes, null);
regionFPSAnim = GLRegion.create(renderModes, null);
- if( null != fontFileName ) {
+ if( null != fontURL ) {
+ Font _font = null;
+ try {
+ _font = FontFactory.get(fontURL.openStream(), true);
+ } catch (final IOException e) {
+ e.printStackTrace();
+ }
+ font = _font;
+ } else if( null != fontFileName ) {
Font _font = null;
try {
_font = FontFactory.get(getClass(), fontFileName, false);
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
index c0753ba85..78dc87489 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
@@ -102,7 +102,7 @@ public class TestTextRendererNEWT10 extends UITestCase {
forceGL3 = true;
} else if(args[i].equals("-font")) {
i++;
- font = FontFactory.get(IOUtil.getResource(TestTextRendererNEWT10.class, args[i]));
+ font = FontFactory.get(IOUtil.getResource(TestTextRendererNEWT10.class, args[i]).getInputStream(), true);
} else if(args[i].equals("-fontSize")) {
i++;
fontSize = MiscUtils.atof(args[i], fontSize);