[SOLVED] Is text styling possible?

It would be nice if I could emphasise particular words in a text element with bold/italic/colouring, was wondering if there’s any way of applying styling to text currently?

1 Like

There’s no way to do that currently but I think the plan is to allow some effects like bold or shadowed text in the future. One way around that is to use multiple text elements at a slightly different offset or size from the others to achieve a bold effect or a drop shadow effect.

Italic text you could do by using an italic font.

2 Likes

Has there been any movement on this? Or even better, allowing multiple fonts in a single element? I realise my use-case is probably not entirely what the system was designed for, but the ability to use both Text and Emoticons in the same element would be very useful.

Hello vaios!

Is there some news about this feature? or maybe a close approach we can do to make this effects? specially the glow one

Hello,

We now support drop shadows and outlines in the text element. We also support sub-string coloring for example you can set the Text of a Text Element to something like:
This is [color="#ff0000"]red[/color]

2 Likes

is that supposed to work? or its in progress? Nothing happen on my side if I copy/paste this example?

Hi @memleak,

It works for me, make sure to enable markup parsing on your text element:

1 Like

Ha! thats totally it! Thanks

beside colouring, do we have a list of supported markup somwhere?

Ahm, yes, so I think even though there is a full blown markup parser in engine the only text effect implemented currently is coloring, as far as I know :innocent:

I would be happy to be wrong on this, @yaustar ?

Supported markup here: https://developer.playcanvas.com/en/api/pc.ElementComponent.html#enableMarkup

Markup engine is currently not in the immediate future unfortunately and currently not planned on the roadmap.

2 Likes

This is very sad that only supported markup is color :frowning:

Perhaps you overlooked the markup outline functions?