How to get default render font into PFont object?

How to get default font of processing? y have try to: PFont DivGSFont = this.g.textFont;

But DivGSFont are null..

Any idea?

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.

Sign In or Register to comment.