1

I need a way to measure distances between a container and a text field or between two text fields ( a heading and a paragraph, for example ).

Scenario: There is a container that seemingly has padding of 20 pixels on all sides, and the first element inside of it is a title of some sort. The actual padding on the top side is less than 20 pixels because of the line height of the title. I need to figure out the exact value as close as possible.

I'm looking to achieve this in any way, a hack, a native tool or a plugin.

I don't mind putting guides between elements and measuring the distance between the guides, but I couldn't figure out a way to select a text layer and get its total height - size of text in pixels + the line height.

Any advice is appreciated.

Elaborated example below:

A card has a seeming padding of 20px on each side. The first element is a title, which has a font size of 20px and a line height of 2. The total height of the title is 40 pixels ( twice the font size ), which gives us 10 extra pixels on top and bottom part of the text. So, if we measure the top padding of the card, from its edge, to the highest letter of the title, the distance is 20 pixels, but because the line height takes 10px of that, the actual padding is 10 pixels, and not 20.

This is of course a simplified example where you can do the math mentally to figure it out, unfortunately most of the time its values like 36 pixels and 1.75 line-height and such, which are not easy to calculate. So I need another method of doing this.

  • I think this is a bit confuse, many things: • Line Height is a CSS property, it doesn't exist in Photoshop. Maybe you're referring to leading. • Is missing some typographical knowledge to know that 20 px size plus 10 px leading will be not the total text field height. Maybe the answer is just knowing the basic of typographic measurement. • Instead of such a big explanation, an image sample with measurements will be so helpful for giving an approximate answer. – Danielillo Jun 23 '18 at 10:49
1

The Info Panel information when selecting an element is not enough?

infopanel

Using the Ruler Tool you get measurements at the Info Panel

ruler tool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.