Firefox developer tools shows the margin relative to the font's body. Here I can see the bottom-margin in yellow, doesn't start from the baseline, it starts from the descender line. rob day​, This is not entirely true. In your screenshot, it seems that the default line-height is 120%. If the line-height is 100% the text will be cut off from below. The boundaries of the view clearly define the height = line-height. And margins/paddings are applied start from these boundaries. Screenshot from Chrome, but in Firefox - all about the same. In Photoshop, the boundaries of the text layer (Point text), from which distances are calculated, go clearly along the edge of the letters. Sticking letters, like "j" and "g", affect both height and distance, but the leading does not (on 1 row). If you use 1 line with a capital letter without sticking ones, like "j" and "g", for example "Foobar" - you can macth Photoshop and the browser and get gaps from above and from below about 15%, which I used in the formula.
... View more