Commit 858b6a9
committed
Handle odd line seperators in CCLabelBMFont.
The XCode plist editor and some other editors can create string data
with Unicode line seperators in it, eg: \u2028.
http://en.wikipedia.org/wiki/Newline#Unicode
You can easily enter one using <ctrl>+<enter> in your plist or code
editor. The plist editor will not let you type <enter> as it will just
commit the current cell being edited. To get an actual newline you can
type <option>+<enter>.
Code in CCLabelBMFont correctly tests using NSCharacterSet
newlineCharacterSet in most places, but in two places incorrectly
tests for equality against '\n'.
So strings with one of these "odd" newlines will be rendered with all
the text on one line. Fix this, and make the code consistent.1 parent 09ee27d commit 858b6a9
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
| 779 | + | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| |||
0 commit comments