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

Elena, it actually worked for me. I am using the exact same font as you for a project and it’s what led me to this thread.

After clicking that option (check box) in the Advanced layout you need to then align the text to the bottom with that button as well “align bottom” and it should work with equal vertical pixel space like it did for me.


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.


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.

1 Like

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!