Name

textLeading()

Examples
# Text to display. The "&#92n" is a "line" character
lines = "L1\nL2\nL3"
textSize(12)
fill(0)  # Set fill to black
textLeading(10)  # Set leading to 10
text(lines, 10, 25)
textLeading(20)  # Set leading to 20
text(lines, 40, 25)
textLeading(30)  # Set leading to 30
text(lines, 70, 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. Note, however, that the leading is reset by textSize(). For example, if the leading is set to 20 with textLeading(20), then if textSize(48) is run at a later point, the leading will be reset to the default for the text size of 48.
Syntax
	textLeading(spacing)
Parameters
spacingint: spacing between lines of text in pixels
Related loadFont()
text()
textFont()

Updated on Tue Feb 27 14:07:12 2024.

If you see any errors or have comments, please let us know.