tags:

views:

40

answers:

2

Hi,

This question is a little bit odd. I have to make sure of the distance between letters above and below. Now when calculating a letter height in Pixel, say font size = 14px does this mean my alloted pixel height for a letter is 14 pixels? What about the letters with tail? How are their tails alloted in Pixels?

------------
|    **    |
|   *  *   |
|  ******  |   = for example this is a 14px font size
| *      * |
|*        *|
------------

What about my lower case letters with tail

------------
|          |
|  ******  |
| *     *  |  = this letter q for example
| *     *  |
|  ******  |
--------*---
        * 

Is there a specific height for its tail that overflows the alloted pixel for a font?

+1  A: 

the tail is included in the allotted pixels if I remember correctly. Check this with adding a border to a span with just a letter:

<span style="border: 1px solid #f00">q</span>
corroded
sorry but I'm not talking about the font size of the web alloted, but in graphics.
rob waminal
@corroded: but you know? you might have a point there..
rob waminal
well it applies to graphics also, if you check in photoshop there should be a box containing the letters. tails are still inside those text boxes, meaning they are accounted for when counting the pixels
corroded
+1  A: 

I would imagine that it depends largely on the system you are using to measure the height of the glyphs. If you're lucky, the font itself provides metrics for the height of a line of text. When height metrics are not available, generally speaking (and particularly with web technologies) the height is made consistent with that of twice the height of a lowercase "x" (the height of the lowercase "x" is known as the x-height). There's a section in the CSS specification on how the x-height of a font can be estimated that has more information.

mattbasta