Py5Graphics.text_leading()

Sets the spacing between lines of text in units of pixels.

Description

Sets the spacing between lines of text in units of pixels. This setting will be used in all subsequent calls to the Py5Graphics.text() function. Note, however, that the leading is reset by Py5Graphics.text_size(). For example, if the leading is set to 20 with text_leading(20), then if text_size(48) is run at a later point, the leading will be reset to the default for the text size of 48.

This method is the same as text_leading() but linked to a Py5Graphics object. To see example code for how it can be used, see text_leading().

Underlying Java method: PGraphics.textLeading

Syntax

text_leading(leading: float, /) -> None

Parameters

  • leading: float - the size in pixels for spacing between lines

Updated on September 11, 2021 16:51:34pm UTC