Specifying fonts


show more Specifying fonts provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing show less
please wait ...

Specifying fonts

Up to this point I've shown you how to include shapes and colors into your sketches in Processing. On the other hand, there may be times that you'll actually want to include text. To this point we most have been showing text in the console beneath, but I want to show you how to actually include it in the sketch window itself. I'll start by just putting a little comment here at the top. And what I'm going to do is create a window, 600 x 200; I'm going to give it a black background; then I'm going to type in a string for the text that I want to include.

I put string with a capital S, because it is actually an object. Then I give the String variable a name. I'm going to call it wordText. It could be anything you want. And equals and then I put it in double quotes. Strings go in double quotes, char variables go in single quotes. I'll put here "A word is worth 1/1000th of a picture." So that's my text, and I finish with a semicolon. A...

Specifying fonts
Video duration: 6m 43s 7h 43m Beginner

Viewers:

Specifying fonts provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing

Subjects:
Developer IT
Software:
Processing
Author:
please wait ...