Is there a way to access the default textsize?

in my code I use the default textsize and then I change it and then I want it to go back to the default again. I've found that textsize 12 is almost the same as the default, but size 12 makes a weird extra space between lines every 8th line. It's annoying and it's messing up my code.

Tagged:

Answers

  • edited September 2015

    I could show some code, but I think it would be overly complicated and unnecessary.

  • @Eeyorelife=== default textSize and font can probably be verified in the P5 preferences.txt (i think that it is 12)

  • You're in luck! The textSize field of PGraphics is public. So you can retrieve the default PGraphics (called g - which is a convenient trick to use in a lot of situations!) and see what its textSize is:

    println(g.textSize);

    It prints out just '12.0' on my system. Probably changing the font changed some other properties as well which you can check.

  • @Eeyorelife::: && as i can see font is Monaco(default)

Sign In or Register to comment.