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
22
G
267
Posts: 3,807
Reputation: 147,745

Post » Thu Jun 22, 2017 2:12 pm

@Ashley
bump
ImageImageImage
B
71
S
22
G
267
Posts: 3,807
Reputation: 147,745

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
405
S
239
G
91
Posts: 24,765
Reputation: 197,454

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
22
G
267
Posts: 3,807
Reputation: 147,745


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests