Hi,
I’m trying to perform a reasonably simple task with text. Say my text is:
THIS IS THE
BIG IDEA
I WANT THESE LINES TO SCALE TO A WIDTH
I just want to get these to line up by altering the scale of the font - so ‘BIG IDEA’ would be in a larger font and ‘I WANT THESE LINES TO SCALE TO A WITH’ would be a lot smaller.
I can kind of do this using the vertical container in UMG but I can’t get it to do the leading correctly.
At the moment i’ve got it running by iteration with the RenderTextComponent in an actor blueprint - it fiddles the font size up and down per line until it’s the right width - then grabs the font height and goes onto the next line. This is not ideal as the leading isn’t always right if there are funny characters and the offline rather than runtime fonts are a bit rubbish looking.
I want to do this in UMG and i’m happy to have many widget components rather than try to ram them into a vertical container but I can’t work out if it’s possible to get the dimensions of the widget (to the edges of the text).
Any help here would be much appreciated.
Dan