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, 10: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: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
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:	899
Size:	12.7 KB
ID:	87096   Click image for larger version

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

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

Last edited by pirl8; 05-30-2012 at 03:07 PM.
pirl8 is offline   Reply With Quote
Old 06-07-2012, 11:14 AM   #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: 73,510
Karma: 126422064
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Oh heck no... this would seriously bloat things big time.
JSWolf is offline   Reply With Quote
Advert
Old 06-07-2012, 04: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, 06: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: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
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, 07:00 AM   #5
pdurrant
The Grand 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: 71,366
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
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
Advert
Old 06-08-2012, 09: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: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
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, 09:51 AM   #7
pdurrant
The Grand 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: 71,366
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
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, 10: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: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
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 11:05 AM.
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 09:18 AM
KF8 conversion and support in Calibre? Rhialto Conversion 19 01-16-2012 05:45 PM
kf8 support apastuszak Calibre 6 11-25-2011 09:22 PM
Orizon Firmware v 3.1 hyphenation support. What's up? DHille Bookeen 3 07-16-2011 11:49 AM
Cybook Opus hyphenation support elmargol Bookeen 1 12-20-2009 01:25 PM


All times are GMT -4. The time now is 01:23 AM.


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