7

Playing with Text

When you want to display text in Processing, it’s important to understand the basics of working with strings, and that’s where this project starts. Once you have the fundamentals down, I’ll show you how to create a font, make a rough typing program, and even create your own data dashboard in Processing.

Just like numbers, text and letters have data types associated with them. Individual letters fall under the char, or character, data type. Characters are normally written inside a pair of single quotes— for example, 'a'. A grouping of characters is called a string and is normally written in double quotes—for example, "Cool!".

THE STRING DATA TYPE

The String data type holds—you guessed it—strings. Just as with any other data ...

Get The SparkFun Guide to Processing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.