Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2012, 10:21 AM   #331
diba
Addict
diba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolate
 
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
Here we are, german localisation for the margins patch.
Attached Files
File Type: txt com.mobileread.ixtab.patch.margins-de.txt (2.5 KB, 317 views)
diba is offline   Reply With Quote
Old 07-25-2012, 02:16 PM   #332
TulseLuper
Connoisseur
TulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with othersTulseLuper plays well with others
 
TulseLuper's Avatar
 
Posts: 61
Karma: 2667
Join Date: Mar 2012
Device: kindle touch
Made some correction here on pt locales.

I think its good now.

I´ll update the wiki from here . See ya !

- wiki updated! -
Attached Files
File Type: zip pt.zip (5.8 KB, 289 views)

Last edited by TulseLuper; 07-25-2012 at 02:25 PM. Reason: update
TulseLuper is offline   Reply With Quote
Advert
Old 07-26-2012, 03:51 PM   #333
ivar
Member
ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.ivar holds these truths to be self-evident.
 
Posts: 23
Karma: 126126
Join Date: May 2012
Location: Tartu
Device: kindle touch, pw
Just for information
In my KT SO deleting /var/local/adunits folder gets no screensaver and no blank screen so for me "Disable Special Offers" downt work. (touching /var/local/adunits as a file gets same effect)
ivar is offline   Reply With Quote
Old 07-26-2012, 05:06 PM   #334
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Does this work for kindle 3? in the OP, i saw that 100% of the java framework can be patched, but don't know if this is still the case.

Last edited by qlob; 07-26-2012 at 05:24 PM. Reason: spelling
qlob is offline   Reply With Quote
Old 07-26-2012, 05:39 PM   #335
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by qlob View Post
Does this work for kindle 3? in the OP, i saw that 100% of the java framework can be patched, but don't know if this is still the case.
Why shouldn't that be the case anymore?

The general approach works for every Java VM - after all, it's pure Java. So yes, of course, the method works on the K3. The only thing that requires some research effort is how to get the patcher bootstrapped. On the K5, this is achieved by registering with the framework as the very first OSGi bundle, and immediately intercepting and hooking into the classloader chain, so that all subsequent class load events come through the PatchingClassLoader.

Of course there are a few K5-specifics in the distribution (most notably the UI), but again: the core will work on everything that runs Java, be it a Kindle, a mobile phone or a PC.

Just give it a try!
ixtab is offline   Reply With Quote
Advert
Old 07-26-2012, 05:44 PM   #336
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by ixtab View Post
Why shouldn't that be the case anymore?

The general approach works for every Java VM - after all, it's pure Java. So yes, of course, the method works on the K3. The only thing that requires some research effort is how to get the patcher bootstrapped. On the K5, this is achieved by registering with the framework as the very first OSGi bundle, and immediately intercepting and hooking into the classloader chain, so that all subsequent class load events come through the PatchingClassLoader.

Of course there are a few K5-specifics in the distribution (most notably the UI), but again: the core will work on everything that runs Java, be it a Kindle, a mobile phone or a PC.

Just give it a try!
Ok, will do. I assume that the installer doesnt work then? so copy the jbpatcher.zip/src files to where they need to be? I'm willing to try anything you throw at me. If you need k3 stuff tested or whatnot, just ask.
qlob is offline   Reply With Quote
Old 07-26-2012, 05:57 PM   #337
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by qlob View Post
Ok, will do. I assume that the installer doesnt work then? so copy the jbpatcher.zip/src files to where they need to be? I'm willing to try anything you throw at me. If you need k3 stuff tested or whatnot, just ask.
I'm afraid it's not as easy as that. The only thing I can throw at you is this: https://bitbucket.org/ixtab/jbpatcher . You'll have to compile and test it by yourself. In particular, you'll need to find the correct place to hook into the system. I can't be of any help with that, since I don't have a K3 anymore, and "remote helpdesk" just doesn't work for these things.

One hint: you may want to start with an old version (maybe the first committed one, 1.0.1). The core logic hasn't changed since then, but it's probably easier to follow, because it's smaller and less configurable than the current version.
ixtab is offline   Reply With Quote
Old 07-28-2012, 06:31 AM   #338
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
This thread now has a shiny new and less cumbersome name, which better fits the software. Thanks to HarryT!

(No, it's not like I only wanted to bump the thread... )
ixtab is offline   Reply With Quote
Old 07-30-2012, 04:42 PM   #339
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Upcoming: justification and hyphenation patch

Hi,

I had already started to develop this some time ago, but then froze development of that particular patch because of the release of JBPatch 2.

Now, because the default formatting is really quite bad (IMO), I came back to this project. It's more or less working, but I would like to get some feedback first.

The fact that the default formatting looks so bad is actually caused by the combination of two different (but somewhat interdependent) shortcomings of the reader software:
  • First, there is no hyphenation support. This means that words which don't fit at the end of the current line will be put on a new line, instead of being hyphenated. This is particularly annoying for languages which tend to contain long words, such as german.
  • Second, for some reason that only the developers know, lines are not always filling the block size. This results in a really ugly layout, where most of the lines are "block-aligned", but where some lines are shorter than the rest.

The patch which is currently under development can, in principle, fix all of these issues. For now, I have implemented three different modes:
  • Block alignment only: This does not involve any hyphenation, but will simply make sure that all lines (except for the ones ending a paragraph) stretch, so that they are left- and right-aligned. This alone already provides a much more pleasant visual experience.
  • Dumb hyphenation: this mode allows words to be hyphenated almost everywhere.
  • Smart hyphenation: In this mode, language-specific rules are considered to determine where hyphenation can occur. This generally leads to much more sensible ("natural") results, even if they aren't always perfect. The downside is that it requires a bit more processing power and memory - and the hyphenation rules, of course. At the moment, rules for about 160 locales are available.

Below are sample screenshots for an english (first row) and a german book (second row). Each row is ordered as follows:
  1. Default K5 display
  2. Justification only, no hyphenation
  3. Justification + dumb hyphenation
  4. Justification + smart hyphenation

Click image for larger version

Name:	screen-en-0default.gif
Views:	396
Size:	37.3 KB
ID:	89928Click image for larger version

Name:	screen-en-1aligned.gif
Views:	395
Size:	37.2 KB
ID:	89929Click image for larger version

Name:	screen-en-2dumb.gif
Views:	415
Size:	38.0 KB
ID:	89930Click image for larger version

Name:	screen-en-3full.gif
Views:	400
Size:	37.9 KB
ID:	89931

Click image for larger version

Name:	screen-de-0default.gif
Views:	379
Size:	39.5 KB
ID:	89932Click image for larger version

Name:	screen-de-1aligned.gif
Views:	354
Size:	39.5 KB
ID:	89933Click image for larger version

Name:	screen-de-2dumb.gif
Views:	353
Size:	42.0 KB
ID:	89934Click image for larger version

Name:	screen-de-3full.gif
Views:	384
Size:	41.6 KB
ID:	89935

Please take a look at these and let me know what you think. At the moment, I'm inclined to make the patch configurable to select between options 2) and 4), but suggestions and feedback are highly appreciated.

Note: Yes, the hyphen character is an "@". This is intentional, because it makes it easier to spot the locations where hyphenation has kicked in. Of course, this will be fixed in the final version.

Last edited by ixtab; 07-30-2012 at 09:25 PM. Reason: minor corrections
ixtab is offline   Reply With Quote
Old 07-30-2012, 05:40 PM   #340
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@ixtab: Unsurprisingly, I really like the full hyphenation (setting 4) . Not a fan of the hard justification, but I guess it'd look better with 'sane' margins .

Thanks for making this happen, it's a huge pet peeve in the french community, too .
NiLuJe is offline   Reply With Quote
Old 07-30-2012, 06:16 PM   #341
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by NiLuJe View Post
@ixtab: Unsurprisingly, I really like the full hyphenation (setting 4) . Not a fan of the hard justification, but I guess it'd look better with 'sane' margins .
Hehe... yeah, that is a rather extreme setting which I chose specifically because it causes a lot of hyphenation and block adjusting, so it makes testing easier. With wider blocks, it will look less extreme.

Quote:
Originally Posted by NiLuJe View Post
Thanks for making this happen, it's a huge pet peeve in the french community, too .
I'll send you a PM in a few minutes with a download link to the development version, so maybe you can try it out with french books

Edit: I just tested "setting 4" using a normal layout, and skimming through some german books: it looks really good, almost perfect actually. The only time that it seems to occasionally make mistakes is with words in a foreign language, such as english names. Still a *huge* improvement over the default display.

Last edited by ixtab; 07-30-2012 at 07:17 PM.
ixtab is offline   Reply With Quote
Old 07-30-2012, 10:44 PM   #342
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Reader Layout & Hyphenation Patch

This patch can fix the alignment of content displayed on the Kindle Touch, and add hyphenation support to the books you're reading. Virtually all languages are supported.

Here are a few screenshots from an english (first row) and a german book (second row), respectively. The pictures in the rows are in the following order:
  1. Kindle default behavior, patch not activated
  2. Patch activated, but no hyphenation support for the current book's language
  3. Patch activated and hyphenation available.

Click image for larger version

Name:	screen-en-0default.gif
Views:	1037
Size:	37.3 KB
ID:	89957Click image for larger version

Name:	screen-en-1aligned.gif
Views:	1088
Size:	37.2 KB
ID:	89958Click image for larger version

Name:	screen-en-2full.gif
Views:	1061
Size:	37.6 KB
ID:	89959
Click image for larger version

Name:	screen-de-0default.gif
Views:	962
Size:	39.5 KB
ID:	89960Click image for larger version

Name:	screen-de-1aligned.gif
Views:	920
Size:	39.5 KB
ID:	89961Click image for larger version

Name:	screen-de-2full.gif
Views:	920
Size:	40.7 KB
ID:	89962

Download and further instructions here.

Last edited by ixtab; 07-31-2012 at 05:27 AM.
ixtab is offline   Reply With Quote
Old 07-31-2012, 01:45 AM   #343
diba
Addict
diba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolate
 
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
Option 2 and 4, 3 is annoying quite quickly. Gonna install immediatelly!
You are amazing, start to take donations!

Why can't this be done by Amazons developers? A lot of customers ask for this options offered by JBPatch.

Last edited by diba; 07-31-2012 at 01:56 AM.
diba is offline   Reply With Quote
Old 07-31-2012, 03:58 AM   #344
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by ixtab View Post
  • Second, for some reason that only the developers know, lines are not always filling the block size. This results in a really ugly layout, where most of the lines are "block-aligned", but where some lines are shorter than the rest.
This is IMO actually a quite ingenious solution when having the preconditions "no hyphenation" and "wanting justified lines".

Without hyphenation and "stupid" justification you often get really ugly holes in stretched lines. That is of course more of a problem in languages like German where there can be quite long words.

So they solved a problem "ugly holes in justified text" by going down a road that - to my knowledge - no typographer has ever done as every typographer knows how to hyphenate. Strange and annoying but still a creative solution.

BTW, if you look at the promotional images of the Kindle Touch, you'll see that the English images are carefully chosen not to display this pseudo-justification: http://is.gd/fsudaS

Whereas the German images show the complete fail in regards to hiding the bad typography: http://is.gd/UxQN7K And this in the country that was once a forerunner of good typography. Ah well, it has been going downhill anyway with typography after Gutenberg printed his first book.

Last edited by bhaak; 07-31-2012 at 04:39 AM. Reason: typo
bhaak is offline   Reply With Quote
Old 07-31-2012, 05:18 AM   #345
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by diba View Post
Option 2 and 4, 3 is annoying quite quickly. Gonna install immediatelly!
You are amazing, start to take donations!
Hehe... thanks. About the donations: I don't think it would yield more than a few bucks. 99% of the people are greedy, and if they can get things for free they will just take them. After all, only few people bother to click on the Karma button, even though all that takes is a few seconds of time.

Quote:
Originally Posted by diba View Post
Why can't this be done by Amazons developers? A lot of customers ask for this options offered by JBPatch.
I'm also starting to feel like I'm mostly fixing Amazon's bugs
ixtab is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks


Forum Jump


All times are GMT -4. The time now is 07:10 PM.


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