View Single Post
Old 02-06-2013, 01:18 AM   #13
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
There is absolutely nothing wrong in the screen shot shown. if you want to avoid that spacing between words, you would have to jailbreak the Kindle and turn on hyphenation for Mobi format. There is no hyphenation for KF8. Not even jailbroken.
Odd. Auto-hyphenation works for me, at least in Kindle Previewer's Kindle Fire and Fire HD modes. No promises about whether the actual devices will do it, but they probably will.

Try adding:

Code:
p {
        text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
}
For the Kindle, I suspect the magic bit is the -webkit-hyphens declaration, as the Kindle KF8 readers appear to be built atop GTKWebKit, and WebKit has supported the CSS3 hyphens property when prefixed with -webkit- since August of 2011.

You can, of course, narrow the scope of the declaration a bit or override this in a more specific style if you have certain paragraphs that you explicitly don't want to auto-hyphenate, e.g.

Code:
p.ragged {
        text-align: left;
        hyphens: manual; /* or none */
        -webkit-hyphens: manual;
        -moz-hyphens: manual;
}
Note that this didn't always work; about a year ago, I filed a bug with Amazon about that little bit of CSS crashing the previewer. They seem to have fixed it since then.

Last edited by dgatwood; 02-06-2013 at 01:23 AM.
dgatwood is offline   Reply With Quote