Rich Text or Label for text-wrapping & how to calculate Height?

1) This link suggests to set contentSize (height =0) in order to achieve the text-wrapping effect for label.

2) Other option is RichText. Do, I really need RichText if I simply wants to have text-wrapping. I’m creating cards which have varied length of texts. So, I was wondering if I can simply use Label then why to use an extra library(RichText) which I am not using anywhere else in the code.

Also, how to get the height of the final wrapped text? want to use this to dynamically set the content size height of my card.
I’ve the same doubt as RichText: how to get the real content size?

And another post [Solved] RichText getContentSize() return (0, 0) which seems to tackle it using scale which is not good idea since I’m keeping my front Size as 30.

Thanks :slight_smile:

This helped http://stackoverflow.com/a/32601866/3241111

It’s sad to know that RichText didn’t work for this simple problem.
I wonder why are formatText or getVirtualContenSize even made. Cocos2d-x Tests also do not have their usage. :confused:

I think using Label is fine. Even though RichText can also wrap the text but doesn’t seem to solve above problem for me.
http://www.cocos2d-x.org/wiki/How_does_CCLabelTTF_support_line_breaks_and_wrapping