Lopdo

set multiple styles for one text

Recommended Posts

Hey there, 

 

I would like to have a single text object with multicolored text and various styles. I want to use it for chat, where name of user who posted message is highlighted with different color. This would be rather easy for single line or if the multiline text could be in separate "column", but since my space is very limited, I need to have the user's name as a part of the text so that new line starts where the name starts. 

You can see clearly what I mean in following screenshot (the part on the right side):

234e461624a787ba2865d43a0881fed18b321024

 

Ideally I would like to be able to achieve the thing on the left as well (multiple styles wherever)

 

The Text object supports only one style AFAIK, is there any workaround I could use (for example rendering DOM element into texture, I could use css to style my text and then render it to texture that would be displayed instead of the Text object)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.