This typeface that I’m building (Dt Flow in the attached picture) reacts all normal in other environments like Adobe or Microsoft softwares. But in Figma, it tends to go 1px down when the line height is set to even numbers - obviously lower when compared to other fonts of the same size and weight.
My team is building many components in Figma based on 20px scale, and I don’t want to cause them huge amount of work moving everything 1px up just because of changing the font. I’ve tried several things editing vertical metrics values but can’t seem to find a way to influence this.
I assume it is a combination of hhea/typoAscender and the respective line gaps.
Different fonts are not supposed to align. But if you want to keep the same metrics as a previous font, you may need to adjust the UPM value, and mimic the ascender, descender and line gaps proportionally in the hhea and typo values.
I recently got into a bit of a fight with a client about this
Turns out some apps (including Adobe XD and also Figma, I seem to remember) place the text according to the “bounding box” defined by typoAscender and typoDescender (or hhea, I don’t remember). In order to center your glyph in this bounding box, you need to center your caps within the bbox. In any case, what you can try is set the typoAscender and typoDescender according to the following recipe:
Hey thank you so much for this recipe! I tried it out with typoAscender & typoDescender, doesn’t seem to do anything in Figma. But I used same values as your recipe on hheaAscender & hheaDescender, worked perfectly for Figma.
But they also ignore the Use Typo Metrics Setting, which basically makes it impossible to use fonts with this setting and the proven “Microsoft” vertical metrics strategy in Figma, as they will then be rendered differently (different base line position inside a box) from what you see in all platforms.