We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How to get default font of processing? y have try to: PFont DivGSFont = this.g.textFont;
PFont DivGSFont = this.g.textFont;
But DivGSFont are null..
Any idea?
The default font is only created, when you use it. So if you use i.e. text() before, then it should work the way you tried.
text()
Another option would be to create your own default font:
PFont defaultFont = createDefaultFont(12);
PFont defaultFont = createDefaultFont(12); works fine ;) Thanks!!
until now i tried: DivGSFont = loadFont("divGSInternal/LucidaGrande-12.vlw"); But your suggestion is more beautifull.
DivGSFont = loadFont("divGSInternal/LucidaGrande-12.vlw");
Answers
The default font is only created, when you use it. So if you use i.e.
text()
before, then it should work the way you tried.Another option would be to create your own default font:
PFont defaultFont = createDefaultFont(12);
PFont defaultFont = createDefaultFont(12);
works fine ;) Thanks!!until now i tried:
DivGSFont = loadFont("divGSInternal/LucidaGrande-12.vlw");
But your suggestion is more beautifull.