07-21-2009, 11:24 AM | #1 |
Enthusiast
Posts: 32
Karma: 45
Join Date: Dec 2007
Device: Kindle DX, PRS505
|
Restore KindleDX's font dialog justification toggle
Selectable text justification is one the issues that I've been keen to have Amazon address. They actually built this feature into all Kindles but left it disabled. I've not seen any issues when using the built in left justification but maybe there is a reason Amazon left it disabled. Maybe it is buggy? Maybe some publishers are forcing Amazon to keep the feature off the Kindle? This is the third generation of the Kindle hardware without an official left justification toggle and it doesn't seem likely that Amazon will enable this so I'll go over the steps I took to enable the built in justification toggle (full, left) on the DX.
First, a bit of background. Out of the box, the Kindle uses full text justification. This means that the left and right margins are even. This looks good to most folks. It is how most printed books look and works well enough. I find that full justification is distracting and prefer a single space between words with a ragged right margin. This is a more agreeable to me when you have the ability to change font sizes, it keeps the white space uniform between the words no matter what font size. (see attached images) I've been following ebs lead on the screen saver fix and poked around the DX until I found the settings that need to be changed to enable the justification toggle. Once these settings are added to your DX, you will see the toggle show up automatically on the font (aA button) screen. The settings to allow the toggle reside in this file: system/com.amazon.ebook.booklet.reader/reader.pref.default Here is how mine looks now: Code:
#Reader Booklet #Tue Jul 21 09:31:16 GMT 2009 FONT_SIZE=36 JUSTIFICATION=left LAST_BOOK_READ=/mnt/us/documents/UR-asin_B001RF3U9K-type_EBOK-v_0.azw ALLOW_JUSTIFICATION_CHANGE=true Code:
#!/bin/sh _FUNCTIONS=/etc/rc.d/functions [ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS} US_ENABLE=/mnt/us/usbnet/AUTO case "$1" in start) if [ -f ${US_ENABLE} ]; then /mnt/us/usbnet/usbnetwork echo "JUSTIFICATION = left" >> /mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref echo "ALLOW_JUSTIFICATION_CHANGE = true" >> /mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref else msg "not usbnet" I fi ;; stop) ;; *) msg "Usage: $0 {start|stop}" W >&2 exit 1 ;; esac exit 0 -robert |
07-21-2009, 01:35 PM | #2 |
Guru
Posts: 695
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
WOW!
Yesterday I was messing with some similar: interline. In Kindle 2 you can press Shift+Alt+<number>, but in DX cannot. Then I searched about that but I couldn't find where K2 stores those justification. How do you search for the strings. I tried to decompile java programs stored in /opt/amazon/ebook/booklet but the result was not usable... |
Advert | |
|
07-21-2009, 01:43 PM | #3 | |
Zealot
Posts: 100
Karma: 629
Join Date: Jun 2009
Location: California, USA
Device: Kindle DX
|
Quote:
If you really want to change some the logic - use something like IDA to produce java assembly and jasmin to compile it back or just re-write the whole file and use normal java tools to compile it. |
|
08-22-2009, 02:08 PM | #4 | |
Addict
Posts: 255
Karma: 1151364
Join Date: Aug 2009
Device: Aura HD and H2O
|
Quote:
|
|
08-25-2009, 01:28 PM | #5 | |
Enthusiast
Posts: 32
Karma: 45
Join Date: Dec 2007
Device: Kindle DX, PRS505
|
Quote:
-robert |
|
Advert | |
|
08-28-2009, 07:27 PM | #6 |
Addict
Posts: 255
Karma: 1151364
Join Date: Aug 2009
Device: Aura HD and H2O
|
Thanks to Gearhead for figuring this out.
When I first got this working, I thought something was wrong, until I realized this only works on some books. In fact, less than half of the books on my Kindle DX will react to this switch. However, in my view, if I can "fix" any books with this switch, it is a good thing. Code:
I don't care to have extra space between words in sentences just to have an aligned right margin. Here is a script I made that is separate from the usbnetwork script: Code:
#!/bin/bash grep_output=`grep ALLOW_JUSTIFICATION_CHANGE "/mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref"` if [ "$grep_output" == "" ]; then echo "Not found - adding" echo "JUSTIFICATION = left" >> /mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref echo "ALLOW_JUSTIFICATION_CHANGE = true" >> /mnt/us/system/com.amazon.ebook.booklet.reader/reader.pref else echo "Justification option already exists in pref file." fi 2) Make it executable (I forgot the exact chmod command) 3) Make a link using command: ln -s /etc/init.d/justify_option /etc/rcS.d/S73justify_option 4) Reboot Last edited by ectoplasm; 09-08-2009 at 10:52 AM. |
11-29-2009, 12:18 AM | #7 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: Kindle 2i
|
Could some generous person wrap this up into a .bin file?
The rivers inside some text are driving me nuts and I spent the last hour trying to figure out this SSH stuff but failed. |
11-29-2009, 01:39 AM | #8 |
Kindle Enthusiastic
Posts: 67
Karma: 582
Join Date: Nov 2009
Device: Kindle 2 International
|
A BIN for the Kindle 2 and Kindle International would also be greatly appreciated!
|
11-30-2009, 05:03 AM | #9 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: Kindle 2i
|
Alright I'm starting to get some of this stuff and wrote this basic install script. I bundled it with the justify_option script above and updated my kindle. Unfortunately, no-go. Any ideas where I went astray?
Code:
#!/bin/sh # Result codes OK=0 ERR=$OK # Move the justify script into place cp justify_option /usr/bin # Make it executable chmod +x /usr/bin/justify_option ln -s /usr/bin/justify_option /etc/rcS.d/S73justify_option # Yay we're done update_progressbar 100 exit $OK |
11-30-2009, 07:31 PM | #10 |
Zealot
Posts: 133
Karma: 348
Join Date: Jan 2008
Device: Kindle 2
|
When a writer writes an ebook, they can use HTML to dictate what justification the paragraph should be in. That makes the toggle very confusing because if I write a book and have justification to full justification in the entire book, no user intervention can make it not fully justified. =(
|
11-30-2009, 08:41 PM | #11 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: Kindle 2i
|
^ I get that, but I'm reading many gutenberg books that don't specify the justification, thus relying on the kindle's default.
|
12-04-2009, 01:37 AM | #12 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: Kindle 2i
|
Any help? I am considering returning the kindle if I can't figure this out.
|
12-19-2009, 06:07 PM | #13 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2009
Device: Kindle 2i
|
One last pity bump and then I'll leave it alone.
|
09-08-2010, 04:43 PM | #14 |
Evangelist
Posts: 470
Karma: 112801
Join Date: Aug 2010
Device: Aura H2O (i86, M96C, Mini&Glo, PRS-950, STR, K-Touch, K-DX, K-3)
|
Another bump - any way to get Left Justification packaged as an update file for v3?
Last edited by EldRick; 09-10-2010 at 10:55 AM. |
09-14-2010, 03:43 AM | #15 |
Evangelist
Posts: 470
Karma: 112801
Join Date: Aug 2010
Device: Aura H2O (i86, M96C, Mini&Glo, PRS-950, STR, K-Touch, K-DX, K-3)
|
Well, it won't restore the Justification dialog, but if you edit the reader.pref file to change Justification=full to =left, and then do a soft restart from the Settings menu, it will set left justification until you either change Words per Line, or do a hard reset.
You can also reduce the margin (in pixels) to get another character or two per line (20 works well) by the same technique. I was thrilled to find this in a Tips thread on kindleboards.com - I find that ragged-right and a smaller margins makes it appreciably easier to speed-read on a Kindle. BIG THANKS to w5jck !!! Last edited by EldRick; 09-15-2010 at 01:49 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hacks Restore the text justification menu toggle without a hack | Gearhead | Amazon Kindle | 68 | 08-15-2015 06:43 PM |
PRS-650 Can the 650 change font and justification? | AlexBell | Sony Reader | 21 | 09-17-2010 05:58 AM |
New preferences dialog | kovidgoyal | Calibre | 22 | 09-07-2010 02:04 PM |
which command does uds send to toggle fullscreen? | Iñigo | iRex Developer's Corner | 16 | 08-06-2010 10:51 AM |
Problem with Volume Toggle? | moxy789 | Amazon Kindle | 2 | 03-04-2009 04:37 PM |