Figma vs. Browser line-height

Schermafbeelding 2022-07-15 om 16.08.19

Hi, I’m building a website following a Figma design. I started noticing the line-height is rendered differently in Figma vs. the browser. In the browser equal space is placed above and below the tekst. In Figma all space is placed below the text.

I read this article (Getting to the bottom of line height in Figma) which confused me even more. It reads like the difference between Figma and the browser was solved a couple of years ago?

Does anyone have an idea how to get the correct line-height? Right now I outline the stroke and subtract it’s height from the original text, divide that by 2 and I know what space should be above the text. Which I need in order to calculate the correct margin/padding to elements surrounding it.

This topic was automatically closed after 30 days. New replies are no longer allowed.