My goal is to have a string content displayed in a given rect and here is what I did:
cc.LabelTTF.create(textContent, "Arial", 40, cc.size(300, 300), cc.TEXT_ALIGNMENT_LEFT, cc.VERTICAL_TEXT_ALIGNMENT_TOP);
if the textContent is:
“I have a watch and I like very much.”
then everything works great, the word “watch” will be placed at the 2nd line (because if placed in the 1st line than the total width of the 1st
line will exceed the dimensions width)
but then I want to display some Chinese text as below:
but this time the label was placed in a single line and exceeded the dimensions width.
then I tried the following text again:
a single long word that exceeds the dimensions width and it was displayed in one line as well
I hope someone can give me advice on how to make the long words like above to auto line-break letter by letter.