Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,738,775 Members 40,915 Now Online
XDA Developers Android and Mobile Development Forum

Help Adding Arabic Support to NST

Tip us?
 
dark_hawk
Old
#1  
dark_hawk's Avatar
Senior Member - OP
Thanks Meter 54
Posts: 135
Join Date: May 2004
Default Help Adding Arabic Support to NST

Hello,

Arabic, like Hebrew, is a Right to left Language.
Android 2.1 does not have support for RTL languages.

This developer here made an application to modify Framework.jar to add RTL support : http://forum.xda-developers.com/showthread.php?t=907635

The problem for Arabic is that unlike Hebrew letters are connected in some cases (most cases actually).

Another developer here add support for Arabic reshaping:
http://code.google.com/p/arabicresha...icReshape.java

Arabic support usually is done through modifying libskia.so and libwebcore.so located at /system/lib.

I don't have any knowledge of how to modify those files and add the ArabicReshaper code to those files.

Can someone please help with this little project?

Thanks in advance.
The Following 2 Users Say Thank You to dark_hawk For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
#2  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Have they already figured out Hebrew support then? I would love to have both.
 
dark_hawk
Old
#3  
dark_hawk's Avatar
Senior Member - OP
Thanks Meter 54
Posts: 135
Join Date: May 2004
Quote:
Originally Posted by LastSilmaril View Post
Have they already figured out Hebrew support then? I would love to have both.
To add Hebrew you just need to replace the font DroidSansFallback.ttf with any font supporting Hebrew, like for example the DejaVu fonts
http://dejavu-fonts.org/wiki/Main_Page
Rename the DejaVuSans.ttf to DroidSansFallback.ttf and push it the device /system/fonts.
But you won't have RTL support, you'll also get Arabic but without the letters connecting nor the RTL support, it's not much but it's a start.
The Following 2 Users Say Thank You to dark_hawk For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
#4  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Aha. Does the linked-to app for modifying your framework work for RTL for Hebrew at least, even if Arabic is still an issue because of the connecting letters?
 
dark_hawk
Old
#5  
dark_hawk's Avatar
Senior Member - OP
Thanks Meter 54
Posts: 135
Join Date: May 2004
Quote:
Originally Posted by LastSilmaril View Post
Aha. Does the linked-to app for modifying your framework work for RTL for Hebrew at least, even if Arabic is still an issue because of the connecting letters?
I don't think it will work.

Quote:
Originally Posted by [B
Compatibility[/B]
This program is intended for use with custom DEODEXED roms of Android versions 2.1 and above. The program will inform you if your build is not deodexed.
The program will allow you to either push the fix directly to the device or flash via recovery.
I don't think the NST is Deodexed.
You can try of course, but make a backup of your system first.
The Following User Says Thank You to dark_hawk For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
#6  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Would something like the following effectively deodex the nook? If it'll allow me to poke around a little more then I'd have no problem trying it (properly backed up of course):
http://forum.xda-developers.com/showthread.php?t=765270
 
dark_hawk
Old
#7  
dark_hawk's Avatar
Senior Member - OP
Thanks Meter 54
Posts: 135
Join Date: May 2004
Quote:
Originally Posted by LastSilmaril View Post
Would something like the following effectively deodex the nook? If it'll allow me to poke around a little more then I'd have no problem trying it (properly backed up of course):
http://forum.xda-developers.com/showthread.php?t=765270
I didn't try it, but I think it would work. The nook is like any Android phone and I don't find any reason why this wouldn't work. If the application can not connect to ADB through wifi you can try connecting it through USB with this: http://forum.xda-developers.com/show...3&postcount=11 or http://forum.xda-developers.com/show...1&postcount=12
The Following User Says Thank You to dark_hawk For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
(Last edited by LastSilmaril; 6th December 2011 at 07:34 AM.)
#8  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Guys - there are no odex files on the NST. No deodexing necessary. Confirm that the RTL Auto-patcher works, except, weirdly, for text in html <select> tags in Opera. Also, sometimes diacritical vowels in Hebrew show up on the wrong side of the letter, but I'm not sure if we can chalk this up to DejaVu or what. I know other Hebrew fonts that are superior, but don't know if they'd have English in them as well.
Nothing going in the reader as I don't think we know how to use custom fonts for that just yet...or do we??? The sans serif fonts for the reader are useless for me and I'd love to replace them with things that are useful. (At least two different fonts for Hebrew and one for Arabic).

In the meantime, we could always embed fonts in epub. It's a chore, but it'll work...
 
LastSilmaril
Old
(Last edited by LastSilmaril; 6th December 2011 at 10:00 AM.)
#9  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Or not. Just tried embedding this font. Calibre's ereader worked fine with it (wasn't perfect, like in my browser, but serviceable), but the nook just gave the same gibberish
I think I might be doing something wrong though; some guys are trying to use 'embedded' fonts (just a reference to the filesystem in the stylesheet) on the Nook Tablet, I think with success. If that works there's no reason fonts actually embedded in the epub file.
Will try and see what happens with DejaVu at some pt, maybe...
 
dark_hawk
Old
#10  
dark_hawk's Avatar
Senior Member - OP
Thanks Meter 54
Posts: 135
Join Date: May 2004
Glad to know RTL is working and no deodexing is necessary.

The developer of the Auto Patcher admits that are still some issues with the application.

Did you try another reader rather than the Stock reader. I find Cool Reader rather superior (Partial refresh, user fonts, style sheet over riding) you can alter anything you want including the fonts, just push the fonts you need to /system/fonts/ and use it in the Cool Reader.

I don't think you'll have problems with Hebrew because as I understand it's letters are not connected.

The Following User Says Thank You to dark_hawk For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes