If I make a sketch using openGL, using vlw fonts made on that same unit, no problem. Displays like a charm. If I turn off the fonts in my font manager (or remove them from the font folder), then it doesn't work, it won't even run. (If I export the app, the same -- it won't launch or open properly if the fonts are not active on the system). This happens even though I am not calling the fonts directly -- I assign a vlw font to a PFont variable, then call loadFont() to load the font.... And, yes, the vlw fonts are located in the sketch's Data folder, properly named.
I also happen to be using ControlP5, but in my testing, that doesn't matter. The same thing happens in a new sketch with no ControlP5.
See below for pseudocode of the kind that I have in my app:
-
ControlFont cFont;
- PFont pFont;
- pFont = loadFont("my_font-12.vlw");
- cFont = new ControlFont(pFont);
The red call is when I get a "Null Pointer Exception".
So, when I distributed the app with the vlws, of course it didn't open on other people's computers. They don't have the font loaded on their machine. I have to distribute the font with it for it to launch properly, and use createFont() instead of loadFont(). This works ok, but they have to load yet another piece of software, and if they don't load it, the graphics look crummy.
There is a known issue with OpenGL and vlw fonts. I have seen other posts on the forum saying that you can put the ttf or otf fonts in the data folder. That doesn't work in any of my tests. For giggles, I also tried putting the ttfs (my font is a truetype) in the top level folder of my sketch, and that didn't work, either.