summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-01 20:07:04 +0200
committerSven Gothel <[email protected]>2011-04-01 20:07:04 +0200
commit5857d93e2d41608b247ec18cb9129f3a6624d9ac (patch)
tree38b1ab9b489b9e249a9d2495aa528db1fbee3288 /src/test/com
parent85c3bcac2ef65aa7c6a5a4990f1e2559d691a361 (diff)
Font Names: Expose name indices allowing user to pick all names ..
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
index a8d822d88..bdfaab17b 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
@@ -92,9 +92,9 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
public GPUTextRendererListenerBase01(Vertex.Factory<? extends Vertex> factory, int mode, boolean debug, boolean trace) {
super(TextRenderer.create(factory, mode), debug, trace);
this.font = FontFactory.get(fontSet).getDefault();
- System.err.println(font.getAllNames("\n"));
+ System.err.println(font.getAllNames(null, "\n"));
- this.fontName = font.getName();
+ this.fontName = font.getName(Font.NAME_FAMILY) + " - " + font.getName(Font.NAME_SUBFAMILY);
this.fontNameBox = font.getStringBounds(fontName, fontSizeFixed*2);
switchHeadBox();
}
@@ -179,7 +179,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
public void nextFontSet() {
fontSet = ( fontSet == FontFactory.UBUNTU ) ? FontFactory.JAVA : FontFactory.UBUNTU ;
font = FontFactory.get(fontSet).getDefault();
- this.fontName = font.getName();
+ this.fontName = font.getName(Font.NAME_FAMILY) + " - " + font.getName(Font.NAME_SUBFAMILY);
this.fontNameBox = font.getStringBounds(fontName, fontSizeFixed*3);
}
@@ -219,7 +219,8 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
}
public void printScreen(GLAutoDrawable drawable, String dir, String tech, boolean exportAlpha) throws GLException, IOException {
- printScreen(drawable, dir, tech, font.getName(), exportAlpha);
+ final String fn = font.getName(Font.NAME_FAMILY)+"-"+font.getName(Font.NAME_SUBFAMILY);
+ printScreen(drawable, dir, tech, fn.replace(' ', '_'), exportAlpha);
}
public class KeyAction implements KeyListener {
@@ -267,4 +268,4 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
}
public void keyReleased(KeyEvent arg0) {}
}
-} \ No newline at end of file
+}