Login  Register

Re: I don't understand ---> ./atomic/jogl-fonts-p0.jar

Posted by LordSmoke on Feb 13, 2019; 10:31pm
URL: https://forum.jogamp.org/I-don-t-understand-atomic-jogl-fonts-p0-jar-tp4039504p4039533.html

Okay.

So instead of just waiting for an updated fat jar, I was a bit proactive and got everything working for my pure JOGL app by loading my preferred font as a stream from my resource directory as described by Xerxes in "Re: Text without AWT?":

./data/Ubuntu-R.ttf

code change:
    static int fontSet = FontFactory.UBUNTU;
    // default
    static int fontFamily = 0;
    // default
    static int fontStyleBits = 0;

...

//            font = FontFactory.get(fontSet).get(fontFamily, fontStyleBits);
// test
InputStream is = getClass().getResourceAsStream("data/Ubuntu-R.ttf");
font = FontFactory.get ( is /*InputStream*/, true /* close stream */) ;

My pure JOGL app now works (except for the odd warnings and some X11 shutdown errors that don't affect program operation) on the Mac and Ubuntu 18.04 with Java 8, OpenJDK 8, OpenJDK 10.0.2

Alas, my J3D app still crashes with font errors on OpenJDK, and there is no comparable place within for me to do something similar within my own code. So, I guess this is now a localized J3D problem.

Comments welcome, but I will post an inquiry on the J3D subforum.