09-14-2012, 04:00 PM | #31 |
Enthusiast
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
|
ixtab,
I had to download version 1.4 of JDK (because latest version of Oracle JDK did not want to compile with -target 1.4, telling me that 1.7 is incompatible with 1.4 - something like that). I have some questions: 1) why are you telling me to change the name of the class from ReaderResources to ReaderResources_en ? I absolutely don't understand why. Are you sure I have to do this? 2) I am using Sun (Oracle) JDK 1.4 downloaded from here: http://www.oracle.com/technetwork/ja...4.2_30-sol-JPR there is a file j2sdk-1_4_2_19-windows-i586-p.exe which I installed, then I put PATH to contain folder C:\j2sdk1.4.2_19\bin\. Then I used command javac -target 1.4 -classpath C:\Projects\opt\amazon\ebook\lib\framework-api.jar com\amazon\ebook\booklet\reader\resources\ReaderRe sources_en.java (the dir c:\opt is a full copy of opt dir from kindle). Command worked without any errors. Question: did I select the proper JDK and do I use proper command to compile? are there any other options that should be specified? |
09-14-2012, 04:12 PM | #32 | ||
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
Quote:
|
||
Advert | |
|
09-14-2012, 05:54 PM | #33 |
Enthusiast
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
|
I didn't understand completely how _en works (especially not clear for me how should it know that a file IhorsReaderResources.jar exists, and why should it load it).
But this doesn't matter. I changed array like this "mobireader.default.font.size.list", new int[] { 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 } and recompiled ReaderResources.java. Then zipped all files (with new ReaderResources.class) to MobiReader.zip, renamed to MobiReader.jar, deleted jar file on kindle (previously backed it up to separate folder at PC) and copied new MobiReader.jar to kindle. Then rebooted kindle. And everything is working! But not so good as expected. After reboot, I press Aa. I see in popup window the same set of sizes as it was before. But when I change font size - I do not see on main panel (where book's text is rendered) same size as I selected. Instead, I see something different. Look: What is more strange, is the fact that after each font change reader.pref contains OLD VALUES - 17, 18, 21, 25, 31, 36, 60, 86. So, when I select the last font size - the size which is written to reader.pref is 86 (!!!) - no matter that such a value DOES NOT EXIST in new array at all ! I see only one reason for such behavior: there is ONE MORE ARRAY. The array with 8 elements (but not 19) which values are taken for Aa popup window. But this array is somewhere else. The question is where. If anyone has any ideas - welcome to tell them here. |
09-14-2012, 06:20 PM | #34 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Try the fontmenu.default.font.size.list ("17, 18, 21, 25, 31, 36, 60, 86" - looks familiar?) inside com.amazon.ebook.framework.resources.UIResources (in opt/amazon/ebook/lib/framework-api.jar).
I really, really, strongly suggest NOT to modify the original jar files, but to create additional resource bundles instead (as I suggested above). It is much cleaner (and much easier to modify or remove) and has much less potential to shoot yourself in the foot. The link that I posted contains all the required information about how and why this works. If you're wondering about why the system will pick up and use the additional jar file: If the DX is anything like the other models, the cvm startup script builds the class path from all the jar files it finds. Edit: supposedly, you don't have to change the ReaderResources file at all. I assume that it contains all the *available* (usable) font sizes, while the UIResources one contains the *selectable* ones. Just a guess though, as I didn't spend any time to analyze the actual code logic. This would explain why nothing is happening when you select the "86" entry: the system probably switches to "39" and says "this is the largest font that I have". Or you could try to add all sizes between 20 and 40 to the ReaderResources, so that anything that you select from the UIResources one is "accepted". Just experiment a bit. Last edited by ixtab; 09-14-2012 at 06:53 PM. |
09-14-2012, 06:35 PM | #35 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Thanks Ixtab. This is good advice (and IIRC you told me something very similar this only last week in reference to kindlets) it's mighty good of you to share your knowldge. many thanks
|
Advert | |
|
09-14-2012, 09:25 PM | #36 |
Enthusiast
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
|
everything works now. I coped with the task. the next message will contain the summary
|
09-14-2012, 11:18 PM | #37 |
Enthusiast
Posts: 43
Karma: 42986
Join Date: Aug 2011
Location: Lviv, Ukraine
Device: Kindle DX Graphite
|
Here is how the result looks like:
Patch with instruction is here: http://depositfiles.com/files/kvo7hona5 mirror: https://hotfile.com/dl/172158634/201...t_fix.zip.html ixtab: thank you very much, if not you - I won't be able to do this. Regards, Ihor |
09-14-2012, 11:28 PM | #38 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
Please, if you can: avoid links to sharehosters. They're a PITA to download from. You can simply attach files to your posts (in advanced edit mode, you can "manage attachments") |
|
09-15-2012, 08:33 AM | #39 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Da files.
kindle_dx_font_fix.zip
Cheers |
09-15-2012, 11:02 AM | #40 |
Guru
Posts: 876
Karma: 10113994
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5 [bricked], Kindle PW1
|
I have one question for @ihor & @ixtab:
Would this edited .jar files work for Kindle Keyboard (currently on FW 3.3)? Since @ihor mentioned that his DX is running FW 3.x I'm guessing original .jar files where from FW 3.x ... |
09-15-2012, 11:54 AM | #41 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
This is the developer's corner, not the newbie's corner - so you are expected to know what you're doing, and you are expected to try it and to report back if it works. That said: no, I'm not trying to be an asshole. Really. I'm actually a nice person, and I'm trying to help people where I can. But (and this may just be subjective) I have the impression that lately, there is a flood of requests which are all alike, and which can be summarized as: "will this work for me?" where people have obviously not even tried to do things, but are asking for full-fledged solutions. Again, this is the developers' corner, so you shouldn't expect easy solutions, but rather you are expected to be willing to invest a bit of effort or experimentation. A great contribution of yours could have been "Cool, I tried it, and it also works on a Kindle 3" or "I tried it, and it also (almost) works on the Kindle 3, but I had to slightly modify this and that". This would have been a nice contribution, because the amount of information in the thread would have increased. Instead, you're just asking the same old question: "Will it work for me?" - I don't know, because I'm not you, and I don't have the devices that you have. If everybody just keeps asking whether it works, and nobody actually tries it, we're going to stay in that state forever. Whoa... ok, I realize that this sounds rather harsh. It definitely isn't meant to be a personal attack on you, so please don't take it as such. It's more like a general comment, reflecting the posts received lately. And now anyway... I don't own neither a KDX nor a K3. But from my understanding, the firmwares *might* well be sufficiently similar for this method to actually work on the K3. If you could test it and report back, that would be very much appreciated. |
|
09-15-2012, 11:56 AM | #42 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Okay . I'll be that idiot. TBC..
EDIT: Okay: Simply dumping them in sftp://root@k/opt/amazon/ebook/lib has no effect. I'll have a dig around and see if I can figure out any differences. My java skills are not all that. Don't hold your breath. On the plus side if some idiot just dumps these into sftp://root@k/opt/amazon/ebook/lib the machine won't explode Hence me trying it first. It's benign and ineffective . There you go. Tested. Last edited by twobob; 09-15-2012 at 11:59 AM. Reason: tested |
09-15-2012, 12:09 PM | #43 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
ah. well that's nice
From the Docs:
Quote:
Perhaps if I figure out what they did on the 3.4 I will do the same myself one day. Glad you got it sorted. |
|
09-15-2012, 12:28 PM | #44 |
Guru
Posts: 876
Karma: 10113994
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5 [bricked], Kindle PW1
|
@ixtab: Maybe you should read my post more carefully? To me the logic behind my question seems aparent: His Kindle DX currently runs Kindle Keyboards firmware, so instead of me taking time to study the whole Kindle 3.1 software for Kindle 2, 2i, & DX topic and/or PM @yifanlu to be able to make educated guess to the question "Does Kindle DX/Kindle 2 runing FW 3.x use 100% Kindle 3 files,or they use some mix of their original FW and new FW files?", instead I've chosen to ask 1 programmer (you) and 1 user who is already using both "moded DX" and this font size modification to make a better guess (for both of you have more knowledge on the subject) not to make any guaranty to me that it will work on Kinde Keyboard.
I may be a noob (to some extent) but I "know" that the same modification can be done by pulling those two .jar files from my Kindle Keyboard and pushing them back after edit. But ok, here is another strategy? Is it possible (and is it enough ?) to do a checksum comparison for: 1) original files from DX,which I would ask @ihor to PM me 2) files pulled from my Kindle Keyboard and if the checksum is the same >>> I can use pre-edited .jar files from provided .zip attachment ? |
09-15-2012, 12:58 PM | #45 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Okay I'm pretty sure Ixtab has outlined that he doesn't "know".
Plus he just spent several hours supporting someone else through a previous problem (while the rest of us were out swilling beer and dancing on tables) Let's go easy on the lovely cuddly dev. *does kind thoughts* So I will answer your question. In the extensive and helpful docs attached by me above from Ihor you will find a docx. Give that a thumb through. In essence what you really want to know is how the 3.x handles the specific classes referenced in this post: https://www.mobileread.com/forums/sho...1&postcount=34 So by all means, grab out your classes, use the tools mentioned, have a look if it looks identical to Ihors explanation - and yes give ihor a nudge about it. Yifanlu is likely less accessible but one can but try. In other news. I dumped the files on a 3.4 to test. it didn't work. I was surprised that you took the time to "reply" to Ixtab but said nothing about my efforts on your behalf. So, let's not let this get into a sad story. I can further advise you that I have just tested this on a STANDARD DX and it does not work. So this only works on a 3.1 hacked DX. shame. It's a great hack. I suppose someone should be motivated enough now to follow those simple instructions (which really are very good by ihor) and construct one for each device . a DX standard, Ihors fusion hack a 3.3 (& maybe 3.4 if they messed with stuff) So yeah! Let's get excited and jump up and down in joy we have the way to adjust things for ourselves. In the true spirit of Dev corner hackery let us wield our tools and break things! Oh and be nice to the animals - and don't feed them after midnight!!! so to recap - 3.4 - does nothing DX - grays out options. Insert your awesome port here! Last edited by twobob; 09-15-2012 at 02:03 PM. Reason: out not our |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font sizes | paulfiera | Conversion | 2 | 08-14-2012 08:49 AM |
602 How to set a hot key for turning off WIFI | jshzh | PocketBook | 2 | 01-27-2011 05:06 PM |
Font sizes | DaleDe | Sigil | 8 | 03-13-2010 05:52 PM |
Font Sizes | brewt | Amazon Kindle | 9 | 06-12-2009 03:03 PM |
Font Sizes on DX | wallcraft | Amazon Kindle | 1 | 05-06-2009 11:08 PM |