Text Plugin Wrapping (Asian language support)

Get help using Construct 2

Post » Wed Mar 07, 2012 11:06 pm

Not sure if this would be classified as a bug, but thought it worth mentioning. Most standard form text controls in other programs will wrap asian language text when it hits the end of a text label width, but in Construct 2, the text just continues off the side, this happens because pictographic languages like Chinese/Japanese do not employ spaces between words.

example picture:



While I'm obviously hoping that this will be patched sometime in the future, is there something I can do in the meantime to get around this?

Thanks,
-- cacotigon
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Wed Mar 07, 2012 11:18 pm

I think you can count the number of characters and every X insert a newline char.

I can't figure a way on how to use Text.width, but maybe someone has an idea...Cassianno2012-03-07 23:18:57
English is not my native language. Sorry for any mistakes and feel free to correct me if needed.
B
14
S
5
G
3
Posts: 110
Reputation: 3,225

Post » Thu Mar 08, 2012 6:13 pm

@Cassianno: yeah, that's kind of my last resort, since I've got several text controls all with different font sizes. :)
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Sat Mar 10, 2012 1:56 am

Ack, it gets even worse, even though Chinese fonts are typically a constant fixed-width per character, a lot of my text mixes Chinese with English words, which unfortunately vary for width depending on the letter, so not even counting would work in this case(unless I tried something bat-sh## crazy like figuring out the width per character per font on a one-on-one basis).
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Sat Mar 10, 2012 2:00 am

Try this plugin. This text plugin can wrap unicode character.

(Well, it can do "typing". I might post it to "plugin thread" latter)rexrainbow2012-03-10 02:02:03
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Sat Mar 10, 2012 2:07 am

@rexrainbow: You are the bomb-diggedy. As far as I can tell, it works flawlessly. You should definitely post this up on the plugins sticky. You may even want to post this plugin as an attach to this bug since it might be related, and could help scirra. Thanks again!

Text Border Bug Postcacotigon2012-03-10 02:08:34
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Sun Mar 11, 2012 1:44 am

@cacotigon

I had updated and posted this plugin, please update it again.rexrainbow2012-03-11 01:45:08
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Sun Mar 11, 2012 4:05 pm

Ah, I never got round to adding character text wrapping to the text object. I'll try get that sorted.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to How do I....?

Who is online

Users browsing this forum: fredriksthlm, MPPlantOfficial, Yahoo [Bot] and 26 guests