Peace be upon you,
as requested from many guys I am writing this topic, some people was asking how the Arabization works?
here is a brief answer for this question, I will sort it be stages,
First: you have to ensure that the system has a free font type support
why is it so important?
simply, the free type gives you a very good ability which is the system will draw the character for you, you don't have to think how the fonts will look like, how will u draw it all of this question will be disappear with simple idea, it is simple but powerful
What if the system doesn't support Free Type?
you will have to do it your self, you will have to draw the character by your self, for example, you can put the character in BMP or JPG, and do some graphics engine that put characters together and make it look like one sentence
Second: Bi Di, this stage is very important and take a lot of time to be done, if you are going to do it by your self,
fortunately that there is library and it is open source, it is called "FriBiDi"
here is links for this GREAT project
this library will help you to rearrange the Arabic Characters, because Arabic from right to left, the whole words will be reversed, so you will have to fix it, also there is many consideration that this library solve, like what if there is English word in the middle of the statement, then it will be MESS, this library will solve the problem
there is one more thing, when I was implementing the algorithm I face a very nice problem, the whole word length, when you fix the string you make like, the first character will be the last and vise versa, when you put this statement in Text Box or any object to display, you will have this problem which is , the lines will be reversed :D
the problem can be solved by detecting the character width, and display area width, so you only put what is enough to display per line, this will help to avoid this problem
Last : Shaping, shaping is very nice and it is totally take no time to do it, simple you will detect the character location ( Start, Middle, End or Standalone ) because Arabic character has 4 shapes, you have to do this part, after that you will find the Arabic string looks OK, and ready to print
How did I do that with Android?
simply when I was watching the Introduction video, I notice that the guy said "Free Type Support"
I smiled then I open the Emulator, and I started looking for the font folder,
as I don't know how to register new font in Android, I replaced the Original font
the cool part comes when I noticed that they have already done the Bi Di support
at the moment I released that all it needs is just Reshape the character the statement
I did this part and guess what it WORKS
there is other many consideration about the Arabization, if you face some please don't hesitate to ask
I hope that this topic was informative for you :)
Thanks for your time