Loading font issues...
in
Programming Questions
•
10 months ago
Receiving this error:
Display 0 does not exist, using the default display instead.
java.lang.NullPointerException
at java.io.DataInputStream.readInt(DataInputStream.java:370)
at processing.core.PFont.<init>(Unknown Source)
at processing.core.PApplet.loadFont(Unknown Source)
at REM$SlideClock.<init>(REM.java:79)
at REM.<init>(REM.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at processing.core.PApplet.runSketch(Unknown Source)
at processing.core.PApplet.main(Unknown Source)
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Could not load font SegoeUI-Light-85.vlw. Make sure that the font has been copied to the data folder of your sketch.
at processing.core.PApplet.runSketch(Unknown Source)
at processing.core.PApplet.main(Unknown Source)
Caused by: java.lang.RuntimeException: Could not load font SegoeUI-Light-85.vlw. Make sure that the font has been copied to the data folder of your sketch.
at processing.core.PApplet.die(Unknown Source)
at processing.core.PApplet.die(Unknown Source)
at processing.core.PApplet.loadFont(Unknown Source)
at REM$SlideClock.<init>(REM.java:79)
at REM.<init>(REM.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
... 2 more
I am running windows 8 developers edition:
here is my code:
class TestFont
{
PFont font;
{
cf = loadFont("SegoeUI-Light-85.vlw");
}
void displayMethod()
{
fill(255);
stroke(255);
textFont(cf);
text("All your base, are belong to us!!!", width/2,height/2);
}
}
1