Thread: JBPatch
View Single Post
Old 05-17-2017, 02:59 AM   #1834
JotaCe
Member
JotaCe doesn't litterJotaCe doesn't litter
 
Posts: 23
Karma: 126
Join Date: May 2017
Location: Madrid
Device: Kindle PW2, PW3
Hello. This is just to report my conclusions testing the margins hack (jar edition) in PW1 6.5.1.1, in case they could be useful for someone in the future:

The tests have been made following the guides by sprite7 in this post. Some new points to remark:
  • The PW1 6.5.1.1 firmware has two entries for "fonts.wordsperline.margin.list". The first time it appears is this:
    Spoiler:
    ldc_w "font.wordsperline.margin.list"
    aastore
    dup
    iconst_3
    newarray atype:int
    iconst_1
    dup
    pop2
    dup
    iconst_0
    ldc_w 50.939998626708984
    invokestatic int com.amazon.ebook.booklet.reader.resources.ReaderRe sources_es.pixVal(float)
    iastore
    dup
    iconst_1
    dup_x2
    ldc_w 33.959999084472656
    invokestatic int com.amazon.ebook.booklet.reader.resources.ReaderRe sources_es.pixVal(float)
    iastore
    dup
    iconst_2
    ldc_w 16.979999542236328
    invokestatic int com.amazon.ebook.booklet.reader.resources.ReaderRe sources_es.pixVal(float)


    And the second time it appears is this one:
    Spoiler:
    ldc_w "font.wordsperline.margin.list"
    aastore
    dup
    iconst_3
    newarray atype:int
    iconst_1
    dup
    pop2
    dup
    iconst_0
    sipush 150
    iastore
    dup
    iconst_1
    dup_x2
    bipush 100
    iastore
    dup
    iconst_2
    bipush 50
    iastore
    aastore
    aastore
    dup


    Editing the first group has no effect. The second one (values 50-100-150), is the right one. Editing both apparently makes no difference with editing just the second.
  • In addition to the editions referenced by sprite7 in the guide mentioned above, I have also tried to modify the entries "reader.content.leftMargin" and "reader.content.rightMargin", to see if they make any difference in the result. They don't.
  • Be careful about editing the value of "font.wordsperline.default". I changed it from 30 to 10 just to try, and that bricked my kindle! (I was lucky and could fix it).

My conclusions after those tests, once you edit the jar file, are following:

1. In mobi books (old version, KF7), you can set the new margin but it is reverted to the default one (the small default one, 50 pt or close) every time you turn the page.

2. In azw3 books (or mobi new version, KF8), if you set the new margins, they survive the page turn, but they don't survive a return to the home page. Once you change the book, or even without opening a new book but exiting the book you are reading to the home page, when you go back to read the margins are lost and the default (small one) is set.

That is, in azw3 you must set the margins for each book, which is more or less acceptable. In mobi, you must do it for each page, which is "a little bothering"

When the margins are "automatically resetted" by the kindle, they are the same as shown in the home menu, view list. Maybe the key could be to modify also those, but I haven't tried. I just mention it here in case it could be helpful for someone in the future.

I hope this info could be useful, although the results are a bit disappointing.

Last edited by JotaCe; 05-18-2017 at 08:06 AM.
JotaCe is offline   Reply With Quote