When the string for a CCLabelBMFont contains a \n, for example "Hello
there\nhow are you doing?" If you are trying to resize the content to fix a
specific size, there is a situation where the updateLabel method can put \n\n
into the string, as its resizing.
I think the problem is here on line 624:
NSString *trimmedString = [multilineString
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
I believe it should be:
NSString *trimmedString = [multilineString
stringByTrimmingCharactersInSet:[NSCharacterSet
whitespaceAndNewlineCharacterSet]];
I might be wrong and it may be working as intended, but after this change, the
updateLabel call would no long insert \n\n into strings while it was resizing
them an correctly moves the \n to the right location to fit within the new
resized area.
Original issue reported on code.google.com by GoodGame...@gmail.com on 8 Jun 2013 at 4:59
Original issue reported on code.google.com by
GoodGame...@gmail.com
on 8 Jun 2013 at 4:59