New issue
 Projects > js > Issues > Bug #3689

CCLabelTTF incorrectly splits up an incoming string with newline characters

Bug #3689 [Closed]
freezeepopprice 2014-01-14 01:21 . Updated about 11 years ago

The following text is incorrectly split by CCLabelTTF when it attempts to detect chinese characters

“email is invalid.↵password is too short (minimum is 6 characters).↵”

The second portion of the string (after the first newline) is kept intact when it should be split up (just before the characters word) when using a field of 310px with a 16pt armata font.

Commenting out the code from lines 132 to 149 restores the behaviour from the previous SDKs. The line in particular which is triggered that causes the whole second portion to not be split up is at 134 (the last re.exec sets result[2] to the newline character)

For now as I do not use chinese characters I will keep the code commented out but a universal solution would be great :)

Thanks

freezeepopprice 2014-01-14 01:29

This is on version 2.2.2 (can’t seem to change the header information in this tool after submission)

pandamicro 2014-01-14 04:49

Hi, Alan

Can you post your code to create the label and its configurations?
Thank you

Huabin

pandamicro 2014-01-14 05:04
  • Status changed from New to In Progress
  • Assignee set to pandamicro
  • Target version set to v3.0 alpha

I have reproduced the bug, thanks for your report!

Huabin

pandamicro 2014-01-14 06:21
  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Atom PDF

Status:Closed
Start date:2014-01-14
Priority:Low
Due date:
Assignee:pandamicro
% Done:

100%

Category:-
Target version:v3.0 alpha