The other solutions aren't generalized, so I thought I'd take a crack at making a more algorithmic solution. If you look at the code for TextMorph, you'll see that the .content element (which contains the text) is having its margin-top property set to be the negative of total-height - lineheight (these are both things you set when you initialize the TextMorph object). The <div> would that has your text would normally appear below your circle (or other shape), so it's being "backed up" into position. All we need to do to get the text to be wonderfully centered is to "back it up" so that it's centered.
The following code starts by setting .content's margin-top to 1/2 the height of the circle. This makes the text appear in the bottom half of the circle. It then incrementally adjusts the margin-top of .content until it is nearly centered (see comment in code). It takes into account that the height (in pixels) of your text might change, depending on font-face, font size, browser rendering, etc.
Snippet:
$('.content').css('text-align', 'justify'); topMargin = 0 - $('#circle').height() / 2; $('.content').css('margin-top', topMargin + 'px'); make_vertical_center = function() { var heightAbove, offset; topMargin -= lineHeight / 4; // more precision, but also more increments as this approaches 1 $('.content').css('margin-top', topMargin + 'px'); heightAbove = Math.abs(($('#circle').height() - $('.content').height()) / 2); offset = Math.abs($('#circle').offset().top - $('.content').offset().top); if (offset - heightAbove > 0) { make_vertical_center(); } }; make_vertical_center();
Take a look at a Fiddle of all this.