aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-25 09:00:20 +0100
committerSven Göthel <[email protected]>2024-01-25 09:00:20 +0100
commit4cbf5297af18f541baa5cd5b85017b1a7a5c19c0 (patch)
treedd120477c0bc762c502d4318e14d16de42599b87 /src/demos/com/jogamp/opengl
parent4358310d3233f38d154c03ffbf1fed71891aeaf3 (diff)
Graph: Drop non-existing 'JAVA' font from FontFactory
Diffstat (limited to 'src/demos/com/jogamp/opengl')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/GPUTextRendererListenerBase01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/util/MiscUtils.java11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/GPUTextRendererListenerBase01.java b/src/demos/com/jogamp/opengl/demos/graph/GPUTextRendererListenerBase01.java
index 461b0eeab..133c66817 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/GPUTextRendererListenerBase01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/GPUTextRendererListenerBase01.java
@@ -441,7 +441,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
public boolean nextFontSet() {
try {
- final int set = ( fontSet == FontFactory.UBUNTU ) ? FontFactory.JAVA : FontFactory.UBUNTU ;
+ final int set = ( fontSet == FontFactory.UBUNTU ) ? FontFactory.UBUNTU : FontFactory.UBUNTU ;
final Font _font = FontFactory.get(set).getDefault();
if(null != _font) {
fontSet = set;
diff --git a/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java b/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java
index b6e8c26d5..b2dcd1ec2 100644
--- a/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java
+++ b/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java
@@ -43,6 +43,8 @@ import com.jogamp.opengl.GLContext;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.InterruptSource;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontFactory;
public class MiscUtils {
public static boolean atob(final String str, final boolean def) {
@@ -169,6 +171,15 @@ public class MiscUtils {
} catch (final IOException e) { e.printStackTrace(); }
}
+ public static Font getInfoFont() {
+ try {
+ return FontFactory.get(FontFactory.UBUNTU).getDefault();
+ // return FontFactory.get(FontFactory.SERIF).getDefault();
+ } catch(final IOException ioe) {
+ ioe.printStackTrace();
+ return null;
+ }
+ }
public static class StreamDump extends InterruptSource.Thread {
final InputStream is;