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 05-30-2012, 11:24 AM   #1
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
KF8 and hyphenation support

As we all sadly know, Kindle does not jet suport hyphenation... Well, that's not completely true.

Actually the KF8/mobi7/AZW3 implemented in Kindle Fire and in Kindle touch since firmware 5.1.0 (and hopefully in K4 in the near future) has something that could be used as a workaround. Try the attached sample or look at the screenshots.

The 1st paragraph is hyphenated and hyphenation is dynamically rendered.

How? Simply inserting the SoftHYphen HTML entity: ­
It works very well (also note the DIV with rounded corners, which also are supported by KF8).

Actually this method is bulky and makes html code unreadeable but it works and doesn't create problems to the kindle searching algorithm.

I would like to implement a Calibre module to automatically insert SoftHYpens in generated AZW3 but I am completely new in Python programming and it may take me a long time (here is a thread with Kovid hints), so if someone feels to be able to do it, he's welcome.

Maybe this method could be used otherwise?
Attached Thumbnails
Click image for larger version

Name:	screenshot_2012-05-30T17_07_29-0200.gif
Views:	530
Size:	12.7 KB
ID:	87096   Click image for larger version

Name:	screenshot_2012-05-30T17_07_42-0200.gif
Views:	518
Size:	15.3 KB
ID:	87097   Click image for larger version

Name:	screenshot_2012-05-30T17_07_53-0200.gif
Views:	556
Size:	15.9 KB
ID:	87098  
Attached Files
File Type: rar x.rar (24.5 KB, 212 views)

Last edited by pirl8; 05-30-2012 at 04:07 PM.
pirl8 is offline   Reply With Quote
Old 06-07-2012, 12:14 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,798
Karma: 19656443
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
Oh heck no... this would seriously bloat things big time.
JSWolf is offline   Reply With Quote
Old 06-07-2012, 05:49 PM   #3
tvjohn
Connoisseur
tvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of light
 
Posts: 83
Karma: 12307
Join Date: Apr 2011
Device: Kindle 3, K4NT
Quote:
Originally Posted by pirl8 View Post
we all sadly know, Kindle does not jet suport hyphenation... Well, that's not completely true.

...(and hopefully in K4 in the near future) has something that could be used as a workaround. Try the attached sample or look at the screenshots.

The 1st paragraph is hyphenated and hyphenation is dynamically rendered.
..
Actually this method is bulky and makes html code unreadeable but it works and doesn't create problems to the kindle searching algorithm.

...

Works fine, including searching in K4NT 4.1.0
tvjohn is offline   Reply With Quote
Old 06-08-2012, 07:20 AM   #4
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
Quote:
Originally Posted by JSWolf View Post
Oh heck no... this would seriously bloat things big time.
Why? Imagine it to be used wisely, for example just in text around pictures, or words longer than n characters. IMHO, it would give a better readability without bloating too much.

(Of course I'm talking in a Kindle user perspective)
pirl8 is offline   Reply With Quote
Old 06-08-2012, 08:00 AM   #5
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,504
Karma: 91510696
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by pirl8 View Post
How? Simply inserting the SoftHYphen HTML entity: ­
It works very well (also note the DIV with rounded corners, which also are supported by KF8).
I'll take occasional short lines over four hyphens in a row.

It would be much better if Amazon implemented a good hyphenation algorithm — a paragraph or perhaps page based one.
pdurrant is offline   Reply With Quote
Old 06-08-2012, 10:40 AM   #6
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
Quote:
Originally Posted by pdurrant View Post
It would be much better if Amazon implemented a good hyphenation algorithm.
I do definitely agree. Even because "Kindle for PC", for example, actually already implements hyphenation, even on mobi6 files. So it seems to me very very silly that they choose not to officially implement it in KF8... Or maybe they had a very good reason, but I can't imagine which.
pirl8 is offline   Reply With Quote
Old 06-08-2012, 10:51 AM   #7
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,504
Karma: 91510696
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by pirl8 View Post
I do definitely agree. Even because "Kindle for PC", for example, actually already implements hyphenation, even on mobi6 files. So it seems to me very very silly that they choose not to officially implement it in KF8... Or maybe they had a very good reason, but I can't imagine which.
Just a clarification: The implementation usually happens in the renderer, not in the format.

Although it is possible to give a format specific ways to add hints for a hyphenation algorithm, in general it's not necessary. I'm not sure whether KF8 has any such hinting mechanism.
pdurrant is offline   Reply With Quote
Old 06-08-2012, 11:59 AM   #8
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, KPW
Thumbs up

Quote:
Originally Posted by pdurrant View Post
Just a clarification: The implementation usually happens in the renderer, not in the format
Yep. That's what I meant. AFAIK ePub has a CSS setting to tell the renderer to hyphenate or not. The hyphenation algorithm is implemented at some level in the renderer.

The fact that ­ is correctly rendered can be used as a workaround; for Amazon it would't be that hard to implement a simple solution: when parsing HTML (and I guess there's an XHTML parser somewhere) the ­ could be inserted in the right position (with language guessed from the book). The user could then decide to turn this feature on or off (exactly as we do with latest firmware for embedded fonts).

Maybe it's not a great implementation but I think that a page with hypens is more pleasant to read than one without, expecially when using enlarging the font.

Last edited by pirl8; 06-08-2012 at 12:05 PM.
pirl8 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coolreader Epub support: CSS and hyphenation tuxor Onyx Boox 6 03-27-2012 10:18 AM
KF8 conversion and support in Calibre? Rhialto Conversion 19 01-16-2012 06:45 PM
kf8 support apastuszak Calibre 6 11-25-2011 10:22 PM
Orizon Firmware v 3.1 hyphenation support. What's up? DHille Bookeen 3 07-16-2011 12:49 PM
Cybook Opus hyphenation support elmargol Bookeen 1 12-20-2009 02:25 PM


All times are GMT -4. The time now is 05:32 AM.


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