LivelyKernel/LivelyKernel — pull request #129 by levjj (2013-04-05 20:09:44+00:00)
Title: Line height support for Text

The ``line-height`` property exists in CSS and can be very useful for texts in Lively.

This example below creates three texts. The first one uses the default line height, the second one is a lighter, less dense text with 150% line height and the third sets the line height to the height of the whole text morph which has the effect of vertically centering a line of text:

```javascript
var bounds = lively.pt(200, 200).extentAsRectangle();
var str = "Lorem Ipsum dolor sit amet. ".times(20);

var txt1 = new lively.morphic.Text(bounds, str);
txt1.openInWorld();

var txt2 = new lively.morphic.Text(bounds, str);
txt2.setPosition(lively.pt(200, 0));
txt2.setLineHeight(1.5);
txt2.openInWorld();

var txt3 = new lively.morphic.Text(bounds, "centered");
txt3.setPosition(lively.pt(400, 0));
txt3.setLineHeight("200px");
txt3.setAlign("center");
txt3.openInWorld();
```

![line-height](https://f.cloud.github.com/assets/479238/345825/9007ded0-9e2c-11e2-9a4d-f162842779a8.png)