See links for complete set of Unicodes of Urdu and Arabic language.
1- http://tabish.freeshell.org/u-font/chart.html
2- https://unicode-table.com/en/#arabic
3- https://en.wikipedia.org/wiki/Arabic_script_in_Unicode
Now let see how to use these unicodes in Unity 3D. To create Urdu word "Tamater"(Tomato in english) by using unicodes of Urdu alphabets Tey,Meem,Alif and Rey follow below steps
1- Create Text GameObject by GameObject > UI > Text. Use font of your choice I'm using
"ADOBEARABIC- REGULAR".
2- Create C# script "UrduWord" and attach with Text GameObject.
3- Paste the code given below.
4- Hit the play button and you will see output like this
As it is very difficult to add Unicodes every time you want to create new word therefore I've created a text file containing Unicodes of all Urdu alphabets in sequence. Read this file sequentially and create a Dictionary for reusability.
https://www.mediafire.com/file/jkof6mjjxbtk50y/UrduAlphabets.txt
1- http://tabish.freeshell.org/u-font/chart.html
2- https://unicode-table.com/en/#arabic
3- https://en.wikipedia.org/wiki/Arabic_script_in_Unicode
Now let see how to use these unicodes in Unity 3D. To create Urdu word "Tamater"(Tomato in english) by using unicodes of Urdu alphabets Tey,Meem,Alif and Rey follow below steps
1- Create Text GameObject by GameObject > UI > Text. Use font of your choice I'm using
"ADOBEARABIC- REGULAR".
2- Create C# script "UrduWord" and attach with Text GameObject.
3- Paste the code given below.
Text wordTxt;
void Start ()
{
wordTxt = GetComponent<Text>();
MyWord();
}
public void MyWord ()
{
char tey = '\uFB68'; //tey unicode
char meem = '\uFEE3'; //meem unicode
char alif = '\uFE8E'; //alif unicode
char tey2 = '\uFB68';
char rey = '\uFEAE';
}wordTxt.text = rey.ToString() + tey2.ToString() +
alif.ToString () + meem.ToString() +
tey.ToString();
4- Hit the play button and you will see output like this
As it is very difficult to add Unicodes every time you want to create new word therefore I've created a text file containing Unicodes of all Urdu alphabets in sequence. Read this file sequentially and create a Dictionary for reusability.
https://www.mediafire.com/file/jkof6mjjxbtk50y/UrduAlphabets.txt
Great read!
ReplyDeleteHave a look at https://youtu.be/MWpmzeB3U4Y , it shows how to Type Urdu using Urdu Nigar Rray version in Unity3D https://youtu.be/MWpmzeB3U4Y
ReplyDelete