I believe I know the cause of this issue, and have a possible fix.
The problem code is the function calculateStringSize in CCImage.mm.
The current code splits the line into separate lines and calculates the height of each line. The individual line heights are then added. The problem is that any empty lines report a height of 0.
Calculating the text height in a single block seems to fix the issue. The following function shows the new code.
calculateStringSize(NSString str, id font, CGSizeconstrainSize)
CGSize dim = CGSizeZero;
CGSize textRect = CGSizeZero;
textRect.width = constrainSize~~>width > 0 ? constrainSize~~>width
textRect.height = constrainSize~~>height > 0 ? constrainSize~~>height
dim = [str sizeWithFont:font constrainedToSize:textRect];
I haven’t found any side effects of this changes yet. Please also note that any trailing empty lines will not be included in the calculated height of the text.
Hope this helps.