Add a "Force CSS Hyphenation" feature

Bug #1204907 reported by Marco Lusini on 2013-07-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kobo Touch Extended Driver
Fix Released
High
Joel Goguen

Bug Description

The current "Hyphenate file" feature of the extended driver doesn't work on the Kobo, since the firmware seems to mess up the display when it finds soft-hyphens in the epub code.

As an alternative, you coud add a single line to the epub CSS (or may be add a brand new, possibly customizable, CSS file...) in order to enable the native hyphenation feature of the ACCESS rendering engine:

* { -webkit-hyphens: auto; }

with this line, every paragraph with a justified text alignment will be hyphenated by the ACCESS engine.
The language used for hyphenation is the one specified in the <dc:language> element of the content.opf. (I think that this can be locally overriden with the 'lang' attribute).
This line is present in libnickel.so, and I guess that it is used when the user selects "justified" in font options dialog.

This feature could replace the current "Hyphenate file" feature or be added as an extra option.

description: updated
Joel Goguen (jgoguen) wrote :

Given that the current hyphenation is just broken, through no fault of the hyphenation library in use, I would be inclined to replace the current hyphenation code with this. The hyphenation may not be as good, but at least the book is displayed properly.

Changed in calibre-kobo-driver:
assignee: nobody → Joel Goguen (jgoguen)
importance: Undecided → High
status: New → Triaged
Marco Lusini (marco-lusini) wrote :

WRT to the quality of the hyphenation, I was able to considerably imrove it by replacing the 'hyphen_it.dic' file (for Italian) in '/usr/local/Kobo/hyphenDicts' with the italian hyphenation file from OpenOffice.

Marco Lusini (marco-lusini) wrote :

In the mean time I found a way to load a custom CSS with every book, so this could be not necessary anymore...
http://www.mobileread.com/forums/showthread.php?t=218814

Joel Goguen (jgoguen) wrote :

It doesn't change that I want to keep this option, but it may change how I'm planning to do it. Davidfor is also working on some CSS modifications, I've sent him a note with what you found, but I'm going to go with whatever method he uses for consistency.

Joel Goguen (jgoguen) on 2013-07-28
Changed in calibre-kobo-driver:
status: Triaged → Fix Committed
Joel Goguen (jgoguen) on 2013-07-28
Changed in calibre-kobo-driver:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers