That’s an issue if you want to use [] and bbcode.
You could utilize the bbcode for icons. Basically draw or copy the bracket graphics to a sprite and, and replace [] with [icon=0] and [icon=1]. That’s the simplest way I’d try.
Second would be to maybe figuring out how to do it with html. Off hand it would just be a bunch of referencing developer docs.
Placing the same text, just colored, over other text could work but in practice it’s a bit tricky depending on how you render text. For the text object and one line of text you can use the Text.TextWidth() expression to get the offset to place text after. Basically you’d split the line into three parts. The text before highlighting, the highlighted text, and the text after. The main complexity is textwidth won’t be updated till the text is drawn so you’ll have to wait a tick before positioning stuff. Also if there is any word wrapping things will be off.
Spritefont is a bit better since you can get the width of individual characters without waiting a tick, but word warping is still an issue.
Beyond that you could do text a character at a time and handle the word warping directly so you have full control of the positions and look of each character. The downside is it’s a slower with the loops and
Instances per character.