SOLVED: Align and style your text by trimming any extra spacing

What @tank666 displayed also worked for me using Helvetica Neue LT Std btw. These 2 options appear to do the same. So no need for that “crop” plugin.

I’m curious if ya’ll have the proper font or if we’re using the exact same one. I’m using 77 Bold Condensed at the moment.

2 Likes

This says it’s solved, but are there code equivalents for text trimming on every platform? Seems like it’s solved from a Figma standpoint but will still ben an issue in clients.

1 Like

This is not an appropriate fix as now the height is not accurate.

thank you for the workaround!

I don’t want trimming. I want it to respect the line-height property, and display it correctly. At the moment, I can’t use half of my fonts, because they seem completely out of alignment. That’s just unacceptable.

3 Likes

hey amazing, thanks for listening.

Hey i have solution about this for typescript code, like this:

  // Set textAutoResize to "WIDTH_AND_HEIGHT" for the text, not the frame
  searchText.textAutoResize = "WIDTH_AND_HEIGHT";
  // Center the text vertically by adjusting the y position
  const frameHeight = searchFrame.height; // Assuming the frame has a fixed height
  const textHeight = searchText.height; // Get the height of the text
  const centerYPosition = (frameHeight - textHeight) / 2;
  searchText.y = centerYPosition;

Sorry @figma, but this is not really solved.
Trimming is not the solution!!!
Please fix this!

4 Likes

Hi all. I have resolved this issue by uploading the misalignment font to fontsquirrel.com and manually adjusting the ascent/descent value until it is aligned. (This will require some trial and error).

I hope this helps everyone, have a good day!