NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

tx.shiver()

Syntax

shiver(x=0.0, y=0.0, baseline=False)

Description

Shivers individual characters in a paragraph(). A horizontal x shiver of 1.0 adds or subtracts a random number to the character's position of up to the character's width. In the same way, a vertical y shiver of 0.5 would add or subtract a random number to the character's position from the baseline of up to half the font size (fontsize * 0.5).

Setting baseline to False creates wobbly text, where each character starts of at the height of the previous character instead of at the baseline.

Example

font("Dolly-Bold", 11)
import tx
string = "A very normal looking paragraph... on the surface..."
tx.shiver(0.0, 0.2, baseline=False)
tx.paragraph(string, 10, 20, 80)