SpriteFont issue

Post » Fri Jun 16, 2017 4:44 pm

The C3 spritefont's default character set has two backslashes. This is different from C2, and I can't find a good reason for it. Using a single backslash seems to work fine (on Windows & Mac) for both the character set and the Text value. Two backslashes do seem to escape to a single one, but if the single one works anyway, this is really confusing. Unless there is some different issue on Linux (which I can't test), I don't see the need for it.
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Thu Jun 22, 2017 2:12 pm

@Ashley
bump
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Thu Jun 22, 2017 3:34 pm

IIRC, this is intentional. C2 had some weird inconsistencies about special characters like newlines in properties. C3 now uses \n for a newline, which means backslashes in general have to be escaped as \\.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Fri Jun 23, 2017 5:31 pm

Ok, that's good. However, it is inconsistent now with setting the text in an action. If I have "One\nTwo\tThree" in the properties, I get newlines and tabs working. If I set this via "Set text", I get: One\nTwo\tThree

Should I log this as a bug?
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868


Return to General Discussion

Who is online

Users browsing this forum: kop9000 and 0 guests