Where exactly on Android does text appear?

Let me first point out what I'm trying to achieve:

To create a patch for the Android OS so that it displays Arabic / Hebrew correctly. Both of these languages ​​are Right-to-Left (RTL), and their script is associated with related letters / glyphs (unlike Latin alphabets with discrete letters).

Example:

The Arabic word for "car":

سيارة

The discrete letters are as follows:

س ي ا ر ة

As you can see, each letter is connected to each other by a letter in different ways depending on what precedes it and what follows it. Ok, enough with language lessons :) My question is:

What binary / class in android do I need to capture in order to enable this function?

Another way to express it; if you want each instance of "x" to be displayed as "y", within the whole system, what binary / class do you need to intervene?

The source code can be viewed on GitHub: http://github.com/android/

I think it could be somewhere under C / C ++ platform_system_core , or their custom JVM platfom_dalvik .

To be clear, a font is not a problem, since you can discard fonts in Arabic and Hebrew as rear fonts, and they will appear, albeit in discrete form.

Your help will be greatly appreciated :)

+7
android right-to-left glyph arabic bidi
source share
3 answers

see external / skia in the extracted source tree. that skia graphics library, and ultimately responsible for rendering fonts.

+1
source share

Remember that the problem is more complicated than changing the underlying graphics engine.

If you apply reformatting to Skia, you may run into problems if changing the width of the lines (occurs when Ω„Ψ§ replaces Ω„, and then - on). This is due to the fact that changing arabica can change the sequence of letters, and Skia, as I see it, is trying to act passively with regard to the content of the text. It simply displays the letters on the display device as is.

Now the worst problem is actually in Android itself. Arabic / Hebrew requires a rearrangement of BiDi text, which is very uninteresting in Android and can not cope with very complex problems.

Other bad news? The Android font, Droid, does not contain Arabic or Hebrew characters. If we do not start the device and replace it with a different font, squares will be displayed instead of Arabic letters :)

The entire platform is far from being able to cope with any RTL language, especially Arabic.

As you can see, the correct modification for RTL languages ​​is not only in Skia ....

+1
source share
0
source share

All Articles