How can I add a background only for one word in a text label?

Hey there!
So I’ve started to work on my own little portfolio and I had a complete vision in mind. I wanted to make a headline that doesn’t look basic and boring, so I added a lot of cool little things to make the text seem more alive. One of my ideas is to highlight my nickname by changing its colour and giving it a black background. I used Rich Text to set the word’s colour and made a black frame behind it and used it as a background, but the issue is that from different devices the background and the text don’t align correctly making it seem weird. Everything is scaled and I tried UIAspectRatio and nothing seemed to work.

Thanks in advance!
Attachments:


Hi to anyone here from the future.
I’ve managed to solve this issue myself and I have achieved it by separating the text into different text labels for each part of the text instead of using Rich Text. In the top line (where I had the issue), I simply made it a UIListLayout to make every text label come right after the previous one which solved two of my problems!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.