UMG Text LineHeightPercentage causes incorrect height/bounds

I have a simple UI set:
Vertical box

  • Size box: Width Override: 400
    – Text: Text Block lorem ipsum dolor sit amet
  • Text: Text Block
    If the line height percentage is at 1, it works fine. But if I lower it, e.g. to 0.6, the Text’s bounds (green box) doesn’t match. You’ll see the bottom green bounds line cut in the middle of the text. This means that the text bleeds outside of the (incorrect) bounds, and means that content directly below the bounds, will occupy the same space as the last line’s text.


Shouldn’t the green line be in the position of the red line as seen below?

I need this bug fixed because my font’s line height is too large and I need to make the line height smaller. Is there a way we can get line height to be in absolute pixels, instead of a percentage? Its hard to match my Figma designs with just a percentage

It is because it also adds the line height percentage to the last line in your text field. That means anything that follows as a vertical box element will have that alignment, overlapping the prior element.
You can always add bottom margin to adjust your text bounds.
To get the accurate LineHelightPercentage you can get the TextBlocks desired size when only showing one line,and use that number to calculate what percentage your LineHeightPercentage should be.
Made a BP function that gets the single line height in Pixels including the LineHeightPercentage, so you can adjust it. Its here LineHeightInPixels posted by anonymous | blueprintUE | PasteBin For Unreal Engine