01-05-2019, 07:52 PM | #1846 |
Wizard
Posts: 1,063
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
|
01-11-2019, 03:48 PM | #1847 | |
doofus
Posts: 2,524
Karma: 13088847
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
Quote:
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. |
|
01-13-2019, 02:55 PM | #1848 |
Wizard
Posts: 1,063
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
@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:
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 03:32 PM. |
01-22-2019, 09:04 PM | #1849 |
Wizard
Posts: 1,063
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
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. |
01-24-2019, 01:00 PM | #1850 |
Guru
Posts: 886
Karma: 10113994
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5 [bricked], 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 Code:
iconst_1 putfield com/amazon/ebook/booklet/yjreader/impl/YJBookController/debug Z 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 03:40 PM. |
03-06-2019, 08:21 PM | #1851 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
In the mean time, inspired by
Quote:
In this firmware version, references to "font.size.mapping" are inside method named "ayT" Spoiler:
and the changes have to be made in method named init at line 27 Spoiler:
Now, /mnt/us/CONTENT_FONT_RAMP /mnt/us/CONTENT_CJK_FONT_RAMP /mnt/us/CONTENT_INDIC_FONT_RAMP properly trigger size overrides in KFX ebooks |
|
03-07-2019, 08:57 AM | #1852 |
Guru
Posts: 886
Karma: 10113994
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5 [bricked], Kindle PW1
|
Yeah, they re-obfuscate Java code with every (non bugfix??) firmware update so the name of the method that parses that txt file changes but so far that variable is still named "debug", at least since 5.9.x up to the latest firmware.
Did you also notice the difference in text size between KF8 and KFX books? For KFX text is smaller... Last edited by shamanNS; 03-07-2019 at 08:59 AM. |
03-07-2019, 02:32 PM | #1853 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Following screenshots show differences in the AZW3 and KFX formats of the Kindle User's Guide, with default behaviour and with overrides for sizes 1, 8, and 14: Default behaviour: With FONT-RAMP and CONTENT_FONT-RAMP overrides Code:
7.33 8.00 8.33 8.67 9.00 9.33 9.67 10.00 10.33 10.67 11.00 11.33 11.67 12.00 |
|
03-07-2019, 03:22 PM | #1854 | |
Grand Sorcerer
Posts: 6,502
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Quote:
The font size of the headings are obviously different between the AZW3 and KFX version. I believe that it is likely an artifact of KFX conversion. It tends to reduce excessive font size variations and vertical spacing. |
|
03-07-2019, 03:42 PM | #1855 |
Grand Sorcerer
Posts: 5,288
Karma: 98804578
Join Date: Apr 2011
Device: pb360
|
I have no plans to read KFX books, but the collaboration in this thread is inspiring.
|
03-07-2019, 04:32 PM | #1856 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
^ @jhowell Yeah, you nailed it
|
03-17-2019, 06:47 AM | #1857 | |
Connoisseur
Posts: 59
Karma: 14210
Join Date: Jul 2015
Device: none
|
Quote:
Do the new margins persist even when you exit a book, or do they keep reverting to the stock margins like described in post 1834? |
|
03-17-2019, 06:19 PM | #1858 |
Wizard
Posts: 1,063
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
|
10-05-2019, 01:46 PM | #1859 | |
Connoisseur
Posts: 96
Karma: 100000
Join Date: Dec 2018
Location: London
Device: Kindle PW4, Libra H2O
|
I just changed the margins (ReaderSDK-impl-en_GB.jar) on my PW4 running 5.11.1, using a neat Java tool called Recaf.
For my firmware level, font.wordsperline.margin.list appears at line 5817, and I used values of 16.9811, 11.8868, 6.7925 (the same as per font.wordsperline.margin.list.pdf). Most of my books are KFX format, and the changes above are effective on page turn, but reset to the wide Kindle defaults if I exit and enter the book. So I set a custom theme, and have to choose that each time I open a book. Is there something I missed to have this working as default? NB: Also have the issue where text is chopped at the edges in 'Goto / Page Flip' previews. Perhaps one of these settings could help : Quote:
Last edited by trcm; 10-06-2019 at 04:32 AM. |
|
10-11-2019, 12:36 AM | #1860 |
Wizard
Posts: 1,063
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
@trcm,
thank you for your insights about page flip! However, I didn't succeed. Here is what I've learned and tried: Spoiler:
I tried to change the first two quantity pairs, but after framework restart or Settings-Restart the page flip window size or text size within it didn't change. Any ideas? |
Tags |
jbpatch, kindle touch hacks |
|