Created
October 21, 2014 11:59
-
-
Save denkspuren/e9d7771213c5ca7f98f8 to your computer and use it in GitHub Desktop.
Costs of loading a font for use in text()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// textFont(createDefaultFont(12)); | |
println(millis()); | |
text("Hello World!",10,15); | |
println(millis()); | |
text("Hello again!",10,35); | |
println(millis()); | |
/* | |
On my console the output is: | |
196 | |
3244 | |
3245 | |
Initial loading of the font takes some time. | |
Using textFont() first (see comment) creates the delay | |
before actually using text() the first time. | |
3259 | |
3299 | |
3300 | |
Thanks for the analysis to Christopher! | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment