RTLTMPro icon indicating copy to clipboard operation
RTLTMPro copied to clipboard

Right to Left with Left to Right issue..

Open morphus74 opened this issue 5 years ago • 13 comments

Hi...

I have a mix of RTL-LTR

Notepad give me the correct writing image

But RTL TMP not image

Just RTL image

Forget my lack of knowledge, but according to my arabe friend, they are inverted (the kind of j and i) in the in a RTL to LTR to RTL setup.

Hope it make sense

morphus74 avatar Apr 17 '21 23:04 morphus74

RTL TMPro decides the RTL-ness based on the first character which in this case is 'a'.

You can select the "Force Fix" option to force RTL mode and get the order of characters corrected.

hk1ll3r avatar Apr 19 '21 06:04 hk1ll3r

Can we input a special character to say from this place its rtl and from this point is ltr?

Sent from Ninehttp://www.9folders.com/


From: Hossein Shah @.***> Sent: Monday, April 19, 2021 02:33 To: mnarimani/RTLTMPro Cc: Michel Lapointe; Author Subject: Re: [mnarimani/RTLTMPro] Right to Left with Left to Right issue.. (#70)

RTL TMPro decides the RTL-ness based on the first character which in this case is 'a'.

You can select the "Force Fix" option to force RTL mode and get the order of characters corrected.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mnarimani/RTLTMPro/issues/70#issuecomment-822208419, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABUZJPRL3Q6W2XOTCGUS74TTJPFB3ANCNFSM43DSO4OA.

morphus74 avatar Apr 22 '21 22:04 morphus74

Use my fork: https://github.com/MRKDaGods/RTLTMPro

MRKDaGods avatar May 30 '21 23:05 MRKDaGods

Thank you, will try it tomorrow

Sent from Ninehttp://www.9folders.com/


From: MRKDaGods @.***> Sent: Sunday, May 30, 2021 19:39 To: mnarimani/RTLTMPro Cc: Michel Lapointe; Author Subject: Re: [mnarimani/RTLTMPro] Right to Left with Left to Right issue.. (#70)

Use my fork: https://github.com/MRKDaGods/RTLTMPro

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mnarimani/RTLTMPro/issues/70#issuecomment-851079772, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABUZJPS2LWQXXAA3ER72VXDTQLEC3ANCNFSM43DSO4OA.

morphus74 avatar May 30 '21 23:05 morphus74

Thank you, will try it tomorrow Sent from Ninehttp://www.9folders.com/ ________________________________ From: MRKDaGods @.***> Sent: Sunday, May 30, 2021 19:39 To: mnarimani/RTLTMPro Cc: Michel Lapointe; Author Subject: Re: [mnarimani/RTLTMPro] Right to Left with Left to Right issue.. (#70) Use my fork: https://github.com/MRKDaGods/RTLTMPro — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<#70 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABUZJPS2LWQXXAA3ER72VXDTQLEC3ANCNFSM43DSO4OA.

No worries, I hope it all goes well

MRKDaGods avatar May 31 '21 00:05 MRKDaGods

It work well, hope you can integrate your change in the main branch. But it's implemented now and my arabe friend are happy :)

morphus74 avatar Jun 01 '21 12:06 morphus74

It work well, hope you can integrate your change in the main branch. But it's implemented now and my arabe friend are happy :)

I am glad :)

MRKDaGods avatar Jun 01 '21 18:06 MRKDaGods

Hi

            Seem there is still issue, but maybe not related 😊

            Writing that
           

image

            Then resizing

image

            My friend says that it should be

image

            Any idea what we could do to fix it? Or is my friend wrong?

Thank

morphus74 avatar Jun 23 '21 15:06 morphus74

Hi Seem there is still issue, but maybe not related 😊 Writing that image Then resizing image My friend says that it should be image Any idea what we could do to fix it? Or is my friend wrong? Thank

Unfortunately this plugin does NOT support multiline mixed text.

The support cannot be added in our plugin and needs to happen inside textmeshpro because "where to break the sentence" depends on the layout of the text and that info is deep inside textmeshpro code.

I have created a post on Unity forums for this issue. Go make a noise there so that they prioritize it. https://forum.unity.com/threads/proper-rtl-support.1077431/#post-6978734

I usually make sure the text is single line. Auto Size option of text mesh pro helps with that for usernames, emails, titles, etc.

hk1ll3r avatar Jun 23 '21 18:06 hk1ll3r

Done, MRKDaGods version already fix a lot of RTL/LTR multiple mixup, but now just missing the linebreak… it’s really annoying.

And as you saw I posted to Stephan_B, not the first time I mention that to him neither ☹

From: Hossein Shah @.> Sent: June 23, 2021 2:38 PM To: mnarimani/RTLTMPro @.> Cc: Michel Lapointe @.>; Author @.> Subject: Re: [mnarimani/RTLTMPro] Right to Left with Left to Right issue.. (#70)

Hi Seem there is still issue, but maybe not related 😊 Writing that [image] https://user-images.githubusercontent.com/6919358/123121332-15320980-d413-11eb-997e-54a0798d307b.png Then resizing [image] https://user-images.githubusercontent.com/6919358/123121356-1a8f5400-d413-11eb-9f3c-2253d973e47f.png My friend says that it should be [image] https://user-images.githubusercontent.com/6919358/123121381-1e22db00-d413-11eb-9e81-6eb963597340.png Any idea what we could do to fix it? Or is my friend wrong? Thank

Unfortunately this plugin does NOT support multiline mixed text.

The support cannot be added in our plugin and needs to happen inside textmeshpro because "where to break the sentence" depends on the layout of the text and that info is deep inside textmeshpro code.

I have created a post on Unity forums for this issue. Go make a noise there so that they prioritize it. https://forum.unity.com/threads/proper-rtl-support.1077431/#post-6978734

I usually make sure the text is single line. Auto Size option of text mesh pro helps with that for usernames, emails, titles, etc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mnarimani/RTLTMPro/issues/70#issuecomment-867070721, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABUZJPQ5CKZ2OL32S5UCULDTUISZTANCNFSM43DSO4OA.

morphus74 avatar Jun 23 '21 18:06 morphus74

I will rewrite the fix to rather parse letters than words, I will also take a look at line breaking and maybe hack it around

MRKDaGods avatar Jun 23 '21 21:06 MRKDaGods

I will rewrite the fix to rather parse letters than words, I will also take a look at line breaking and maybe hack it around

If you can pull it off I'll be sure to pull it back into the main repo.

I bit of backstory for context: I spent a couple of days on it and gave up. We currently decide where the boundary for RTL vs LTR text is. Then we reverse the order of characters in RTL sections. You will need to also detect where the line breaks are (due to word wrapping, so there is no \n char). And reverse the order of characters in each RTL section in each line. I also tried going into textmeshpro code and could share with you my WIP branch if I can find it. TMP_Text.cs has most of the layout code which deals with adding line breaks.

Good luck!

hk1ll3r avatar Jun 23 '21 21:06 hk1ll3r

I will give it a go tonight and let you know how it goes!

MRKDaGods avatar Jun 23 '21 21:06 MRKDaGods