dir="rtl" not working, why ?

Discussion and feedback on Construct 2

Post » Fri May 27, 2016 11:15 am

hi
i want RTL support for my texts
i add this (dir="rtl") to canvas tag like here : http://stackoverflow.com/questions/8961 ... eft-string
but its not working for c2 why ?
is there any other way to fix that ?
(c2 dosn't really support RTL (right align is not RTL))
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Fri May 27, 2016 6:34 pm

@Ashley
can you help me ? what did you with the engine wich dir="rtl" not working ?
i mean it has to working with the engine .
what can i change ?
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Sat May 28, 2016 10:46 pm

why do you use html5 coding on text objects? text objects have a hotspot alignment in the setting bar... if you want the text to be written on right side just change it. to right/left/center/top/bottom etc
B
70
S
20
G
67
Posts: 1,315
Reputation: 42,303

Post » Sun May 29, 2016 12:14 am

he doesn't want a right alignment, he wants to write from right to left (RTF) (maybe for Arabic font)
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Sun May 29, 2016 6:55 am

rtl can only be achieved with a textbox, you can add a css action with key "dir" value "rtl", normal text can only be aligned.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun May 29, 2016 8:09 am

Lof wrote:rtl can only be achieved with a textbox, you can add a css action with key "dir" value "rtl", normal text can only be aligned.

i can not use textbox because i want to use canvas+
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Sun May 29, 2016 8:47 am

Sorry, then you can't, I did found a special character a while ago, that if I past it at the end of the text it sort of fix it to rtl (tried with hebrew) but it's not 100% perfect, try it, just add the following quotes and special character to the end of your text (note, the character is not visible, but it's there, just copy it as is)
"‏"

Hope it helps.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun May 29, 2016 9:37 am

Lof wrote:Sorry, then you can't, I did found a special character a while ago, that if I past it at the end of the text it sort of fix it to rtl (tried with hebrew) but it's not 100% perfect, try it, just add the following quotes and special character to the end of your text (note, the character is not visible, but it's there, just copy it as is)
"‏"

Hope it helps.

i tried it before but not working
i just ask why dir="rtl" not working it has to work with canvas
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Sun May 29, 2016 9:40 am

My guess is the text object uses a different way of drawing the text, then what's on your example, try asking the team.
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Sun May 29, 2016 11:23 am

This character should do the trick, it works for me (copy the following line or the second code box bellow):

Make sure you put the character to the start of the text to turn it around (example: [character]text will result as txet).
When using event sheet:
Text.Set Text -> "[character]This is some text."
this will turn to .txet emos si sihT

Code: Select all
B
32
S
7
G
4
Posts: 397
Reputation: 4,589

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 13 guests