I notice that text elements have an
Enable Markup option, and this post covers that at the very least color styling is possible, but I can’t find any resources on regular markup styles like bold and italic. It seems
[b]text[/b] isn’t working, and while I saw that will commented here regarding the fact that text is rendered using WebGL rather than the DOM, I was thinking that it should be possible for the PlayCanvas engine to bind multiple related fonts together in a font-object.
Right now, there exists a font asset, and while my project has two font assets (one for Regular, one for Bold), they’re in no way linked, and it would make sense to be able to link them so that I can switch between regular, bold, and italic on the text element (additional text features like Unity’s TextMeshPro has, like auto-capitalize all, auto-uncapitalize would also be excellent), or, as my current problem poses, being able to change them via markup mid-text.
At least those are my thoughts, assuming I haven’t missed some way to properly bold mid-text as I’m looking for.
As an additional note, if I have something like
this.entity.element.text = ("[color=\"#ff0000\"]text[/color]").toUpperCase();
toUpperCase() throws off the color as I assume
[COLOR="#hex"] isn’t the same as
[color="#hex"], which doesn’t feel like it should act that way.