Find height of rendered/visible text
<p>I know how to get this height of a font:
<img src="http://i.stack.imgur.com/U3fL1.png" alt="enter image description here"></p>

<p>By placing the text in a div and getting offset height of the div.</p>

<p>But I would like to get this actual height (Which will depend on font family):
<img src="http://i.stack.imgur.com/yNu12.png" alt="enter image description here"></p>

<p>Is that in any way possible using web based programming?</p>
