Label with bold and italic text

Hello,

Do you know a way for put label text in italic and bold in the same label ?

In advance thanks,

I’m curious about this too, has anyone found a solution for this? The closest I can think of is like manually parsing the text for markers and then put all these labels in a Layout or something. Not ideal.

Look at cocos2d-x’s RichText and RichElementText classes.

RichText provides the ability to inline images (emotes etc), change font, colour, opacity and effects of text and supports hyperlinking. As well as a custom node for more advanced element types you may wish to implement.

http://cocos2d-x.org/docs/api-ref/cplusplus/v3x/dd/d4b/classcocos2d_1_1ui_1_1_rich_text.html
http://cocos2d-x.org/docs/api-ref/cplusplus/v3x/d9/d99/classcocos2d_1_1ui_1_1_rich_element_text.html

1 Like