Konash / arabic-support-unity

This plugin allows you to use accurate and correct Arabic text in your game or 3D application. Supports Tashkeel and Hindu numbers. Supports C# and JavaScript. Supports 4 Persian Characters.
MIT License
220 stars 64 forks source link

Wrong brackets formatting #22

Closed mad-rain closed 6 years ago

mad-rain commented 6 years ago

Hi!

There is a problem with brackets formatting. Script reverses them when this is not needed.

(سربازخانه (0/18

Konash commented 6 years ago

Hi, The scripts reverses them because it assumes that what is between the brackets is arabic letters.

image

If you rather using numbers instead, I suggest you comment the part in the code when the brackets are flipped.

if (lettersFinal[i] == '(') numberList.Add(')'); else if (lettersFinal[i] == ')') numberList.Add('('); else if (lettersFinal[i] == '<') numberList.Add('>'); else if (lettersFinal[i] == '>') numberList.Add('<'); else if (lettersFinal[i] == '[') list.Add(']'); else if (lettersFinal[i] == ']') list.Add('[');