diff options
Diffstat (limited to 'src/demos/com')
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java | 2 | ||||
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/util/MiscUtils.java | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java index cacd19789..312558c33 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java @@ -276,7 +276,7 @@ public class UIMediaGrid01 { mainGrid.setName("MainGrid"); mainGrid.addShape(mediaView); { - final Font fontInfo = MiscUtils.getInfoFont(); + final Font fontInfo = Scene.getDefaultFont(); final Label infoLabel = new Label(options.renderModes, fontInfo, "Not yet"); infoLabel.setColor(0.1f, 0.1f, 0.1f, 1f); final Group labelBox = new Group(new BoxLayout(mediaGridSize.x(), mediaCellHeight / 10, new Alignment(Alignment.Bit.Fill.value | Alignment.Bit.CenterVert.value), diff --git a/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java b/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java index b2dcd1ec2..27bd66ce4 100644 --- a/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java +++ b/src/demos/com/jogamp/opengl/demos/util/MiscUtils.java @@ -40,8 +40,9 @@ import java.util.List; import com.jogamp.opengl.GLAnimatorControl; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLContext; - +import com.jogamp.opengl.demos.graph.FontSetDemos; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.InterruptSource; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; @@ -171,10 +172,10 @@ public class MiscUtils { } catch (final IOException e) { e.printStackTrace(); } } - public static Font getInfoFont() { + public static Font getSerifFont() { try { - return FontFactory.get(FontFactory.UBUNTU).getDefault(); - // return FontFactory.get(FontFactory.SERIF).getDefault(); + return FontFactory.get(IOUtil.getResource("fonts/freefont/FreeSerif.ttf", + FontSetDemos.class.getClassLoader(), FontSetDemos.class).getInputStream(), true); } catch(final IOException ioe) { ioe.printStackTrace(); return null; |