Problem with text warp

I need create a label with wrapText. In this case I have the String “Extra Movement”, when a set the label.width = 70 the word “MOVEMENT” is hided and the label was center too far. I dont know where is the problem. Any help ?

label = cc.LabelTTF.labelWithString("EXTRA MOVEMENT", cc.SizeMake(70,50), cc.TextAlignmentLeft, "ALoveofThunder", 8);

It looks like you are using Cocos2d-html5 alpha1 version. The alpha version has a bug in LabelTTF display.

There are 2 solutions:

  1. The width must be no less than 77.
  2. Update the engine to beta version, which supports auto word warp.
    PS: The beta version will be released soon. You may download the code from Github before release.

Shun Lin wrote:

It looks like you are using Cocos2d-html5 alpha1 version. The alpha version has a bug in LabelTTF display.
>
There are 2 solutions:

  1. The width must be no less than 77.
  2. Update the engine to beta version, which supports auto word warp.
    PS: The beta version will be released soon. You may download the code from Github before release.

Ok ! Thanks for info Shun.

I have a problem same. I use cocos2d js 3.10. Text widget auto wrap, but on web is wrong, on mobile is right. Please help me fix text auto wrap on web. Thanks