Render arabic font using native JNE
Important library list :
- Free Type (https://android.googlesource.com/platform/external/freetype.git)
- Harfbuzz, for text shaping. (https://github.com/arkusuma/harfbuzz-android)
- Make sure that your class & package is exactly same as written in your jni source code (*.c)
- Change your native text android textview to ArabicTextView in your layout xml. The complete name is depends on your package & class name of your
ArabicTextView
class name - Copy the
jni
andobj
folder. The jni contain the c-code, and the obj contain the compiled library. If you interest to compile your own version, please refer to free type and harfbuzz library repo. - Don't forget to add the apropriate font in your assets
- Please, DO NOT add extra font manipulation in your code. It may broke the layout / the arabic view
Parts of this example were taken from https://github.com/arkusuma/quran-android