File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1212static NSString *TEST_STRINGS[] = {
1313 @" ABCDEFGHIJKLM\n NOPQRSTUVWXYZ" ,
1414 @" abcdefghijklm\n nopqrstuvwxyz" ,
15+ @" first line\u2028 second line" ,
1516 @" ,.?!;:'\" " ,
1617 @" ()[]{}<>\\ |/\n " ,
1718 @" @#$%^&*+-=_" ,
Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ -(void) createFontChars
762762 // since the Y position needs to be calcualted before hand
763763 for (NSUInteger i=0 ; i < stringLen-1 ;i++) {
764764 unichar c = [_string characterAtIndex: i];
765- if ( c== ' \n ' )
765+ if ([[ NSCharacterSet newlineCharacterSet ] characterIsMember: c] )
766766 quantityOfLines++;
767767 }
768768
@@ -776,7 +776,7 @@ -(void) createFontChars
776776 for (NSUInteger i = 0 ; i<stringLen; i++) {
777777 unichar c = [_string characterAtIndex: i];
778778
779- if (c == ' \n ' ) {
779+ if ([[ NSCharacterSet newlineCharacterSet ] characterIsMember: c] ) {
780780 nextFontPositionX = 0 ;
781781 nextFontPositionY -= _configuration->_commonHeight ;
782782 continue ;
You can’t perform that action at this time.
0 commit comments