# NodeBox

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

# pixie.height()

## Syntax

    height(text, width, pt=20)

## Description

Returns the height of a Pixie text paragraph() with given txt, width and point size pt. Because baselines in a Pixie paragraph wobble randomly, this command gives some idea of the actual height, with an average deviation of 20%.

## Example

    pixie = ximport("pixie")
    txt += "Pixie was originally a part of the Aunt Hillary code package,"
    txt += "a handwriting that looks different each time, contains mistakes,"
    txt += "has wobbly baselines and variable color pressure."
    print pixie.height(txt, 200)
    >>>130.420885899