Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2019, 08:52 PM   #1846
mergen3107
Connoisseur
mergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tongue
 
mergen3107's Avatar
 
Posts: 82
Karma: 22824
Join Date: Feb 2012
Location: Cape Canaveral
Device: KPW3 (5.9.7 JB); Kindle 4NT Black (4.1.3 JB)
Quote:
Originally Posted by Elendiar View Post
Can someone give additional info what to edit to fix this ?
I just left default smallest value as my new largest one. I use it only when skimming.
My values are (PW3): 16.98 7.55 5.00
mergen3107 is offline   Reply With Quote
Old 01-11-2019, 04:48 PM   #1847
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,248
Karma: 7359115
Join Date: Sep 2010
Device: Voyage, PW2, Galaxy Tab S
Quote:
Originally Posted by mergen3107 View Post
I confirm working margins methods as described by stripe7.
KPW3, 5.9.7, English US.
I modified though not ReaderSDK-impl-en_GB.jar, but just ReaderSDK-impl.jar (which is default for English US).
I put 16.98, 11.32 and 7.55 for three types of margins.
7.55 for top/bottom/progressbar stuff.

One thing I don't understand with MOBI font sizes.
In Mobi-drawing.jar there are 8 font sizes listed, but the reader has a choice of 14. Plus it seems like the font size around 29 is the maximum 14th one, not 8th.
Font size 29 in MOBI is about the same size (visually) as the 14th one in KF8.
Spoiler:

Default FONT_RAMP values for KF8: 6.96 7.92 8.4 9.36 10.56 11.52 12.48 13.92 15.36 17.04 19.20 22.08 25.2 29.28

Default values for MOBI: 7.13 ; 7.81 ; 8.49 ; 9.17 ; 10.53 ; 12.56 ; 16.98 ; 29.2


Where are other 6 sizes?
On 5.9.7, the first 5 sizes for 300dpi are identical for mobi and azw3. Then it goes like this

Mobi azw3

6 7
7 9
8 14

I think the other in between values are interpolated. They couldn't bother with mobi, I guess.
Barty is offline   Reply With Quote
Old 01-13-2019, 03:55 PM   #1848
mergen3107
Connoisseur
mergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tongue
 
mergen3107's Avatar
 
Posts: 82
Karma: 22824
Join Date: Feb 2012
Location: Cape Canaveral
Device: KPW3 (5.9.7 JB); Kindle 4NT Black (4.1.3 JB)
@Barty,
Thank you!

I'll try them then.

UPDATE

@Barty, thank you again!
I put the appropriate values of KF8 (which all were initially chosen manually) into MOBI font sizes like this:
##1-5 identical
#6 = #7
#7 = #10
#8 = #14

Exact values are:
Spoiler:
Code:
#1   #2   #3   #4   #5    #6    #7    #8    #9    #10   #11   #12   #13   #14
8.42 8.84 9.26 9.68 10.10 10.52 10.94 11.36 11.78 12.20 12.62 13.04 13.46 13.88 (new KF8)

#1   #2   #3   #4   #5    #6    #7    #8    #9    #10   #11   #12   #13   #14
8.42 8.84 9.26 9.68 10.10 10.51 10.94 11.35 11.77 12.20 12.60 13.02 13.44 13.88 (new mobi)


It looks like there are some differences still, due to interpolation factors, but it is only about 0.02.

Yes, dictionary font size jumped to #3 = 9.26, which is larger than 8.49 by about 9%, but that's still fine.

Last edited by mergen3107; 01-15-2019 at 04:32 PM.
mergen3107 is offline   Reply With Quote
Old 01-22-2019, 10:04 PM   #1849
mergen3107
Connoisseur
mergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tonguemergen3107 can tie a knot in a cherry stem with his or her tongue
 
mergen3107's Avatar
 
Posts: 82
Karma: 22824
Join Date: Feb 2012
Location: Cape Canaveral
Device: KPW3 (5.9.7 JB); Kindle 4NT Black (4.1.3 JB)
Does anybody know how can we change fonts for kfx files?
After my alterations for mobi7 and kf8 above, downloaded books from Amazon look like they have default set of font sizes.
mergen3107 is offline   Reply With Quote
Old 01-24-2019, 02:00 PM   #1850
shamanNS
Evangelist
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 455
Karma: 1100000
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW3[300dpi] , Kindle PW1
Someone with actual Java skills could probably do it. Most likely place to look at would be "YJReader-impl.jar" file and inside that there is a class "YJBookController.class".

It contains references to "font.size.mapping" inside method named "axO":

Code:
...

private boolean debug = false;
private static final String aQi = "/mnt/us/CONTENT_FONT_RAMP";

...

public float[] axO() {
        float[] arrf;
        if (this.debug && (arrf = ReaderUtils.E((String)aQi, (int)this.mE().length)) != null && arrf.length > 0) {
            return arrf;
        }
        return (float[])ResourceBundle.getBundle(jb).getObject("font.size.mapping");
    }

The code is from firmware 5.9.7 for PW3.

As far as I've managed to understand the code if a field/member variable named "debug" wasn't set to "false" Kindle users would be able to re-define font sizes used for KFX books by creating a text file at "/mnt/us/CONTENT_FONT_RAMP" in the same way we can re-define font sizes for KF8 books by using "/mnt/us/FONT_RAMP".


So a Java & Java ByteCode guy that is well versed in decompiling & recompiling code would probably just need to "toggle" that "debug" variable value to enable parsing of "CONTENT_FONT_RAMP" file.



---------------------
EDIT: OK, I've just tested it an confirmed that it is working as expected.

So, the only thing that needs to be changed is line 15 of init method of "YJBookController.class"

before change:
Code:
iconst_0
putfield com/amazon/ebook/booklet/yjreader/impl/YJBookController/debug Z
after change:
Code:
iconst_1
putfield com/amazon/ebook/booklet/yjreader/impl/YJBookController/debug Z
Then just create "CONTENT_FONT_RAMP" with the same type of content (14 decimal/float type numbers) that you would use (or were already using, like I was) in "FONT_RAMP", reboot Kindle and it should work.

I noticed that KFX book will have slightly smaller font sizes for the same values... am to lazy to check if it because of the difference in "base font size" between two books or just Kindle using different "scaling" for those 2 book formats (KFX and KF8/AZW3).

Last edited by shamanNS; 01-24-2019 at 04:40 PM.
shamanNS is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 11:41 PM.


MobileRead.com is a privately owned, operated and funded community.