textLeading() \ Language (API) \ Processing 1.0
Author: Casey Reas & Ben Fry
Description: Processing is an electronic sketchbook for developing ideas. It is a context for learning fundamentals of computer programming within the context of the electronic arts.
Keywords: Processing, Processing, Interactive Media, Electronic Arts, Programming, Java, Ben Fry, Casey Reas

Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### textLeading()
Examples |
    PFont font;
    // The font must be located in the sketch's
    // "data" directory to load successfully
    font = loadFont("EurekaMonoCond-Bold-14.vlw");
    // Text to display. The "\n" is a "new line" character
    String lines = "LIN1\nLIN2\nLIN3";
    textFont(font, 14);
    textLeading(10);
    text(lines, 5, 25);
    fill(126);  // Set value to gray
    textLeading(20);
    text(lines, 36, 25);
    fill(0);    // Set value to black
    textLeading(30);
    text(lines, 68, 25);
Description | Sets the spacing between lines of text in units of pixels. This setting will be used in all subsequent calls to the text() function.
Syntax |
    textLeading(dist)
Parameters |
dist | int or float: the size in pixels for spacing between lines
Returns | None
Usage | Web & Application
Related | loadFont() PFont text() textFont()

Updated on August 30, 2010 04:29:39pm EDT