Thread: Touch .kepub.epub
View Single Post
Old 04-14-2013, 06:01 AM   #189
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
Quote:
Originally Posted by clsdclsd View Post
I just tested the latest kepub.epub plugin with interesting results.
Highlighting works on some files,and doesn't on others, and I've found one where it works on some chapters but does not work on others (or maybe it's not chapter related but some parts of the text can be annotated, others not.)
I've put the kobo.js in a book and referenced it in the htmls, and the highlighting bug healed.
But the hyphenation messes things up.
Every paragraph which has hyphenated word in it aligned to left, regardless of the kobo settings or the css style. And the hyphenation occurs way too "early".
Highlighting in those paragraphs works strange: the selection have an "offset", it seems to work on the justified text, even if it's shown as left-aligned. After the highlight made, the row appears justified.
I've attached some pictures to show this.
As I've mentioned many times before, I can't include kobo.js or kobo.css, both of which are needed for many things (highlighting, annotations, bookmarks...) to work properly, because they are copyrighted non-distributable files. What you say about highlighting is unsurprising, but I don't know about the display justification issue. Since it resolved itself when you added the Kobo CSS and JS, I suspect it's another item to add to the list of things that may or may not work well or at all.

I can't fix these things unless Kobo suddenly decides to allow third-party distribution of their CSS and JS files. Considering how specific the device support is for my plugin, I couldn't even justify adding an option to include "arbitrary" CSS and JS. calibre itself already let's you add CSS rules (but not a file) and the only JS that would be worth including is the Kobo JS.

Also keep in mind that this plugin is enabling access to an internal renderer that is only intended to work with Kobo-supplied kepub files. Kobo has explicitly stated (on these forums, maybe even this very thread but I don't have the link right now) that they recommend not using the kepub renderer with side-loaded books. The renderer is likely coded to use features known to be present in Kobo kepub files, with sensible defaults. The hyphenation feature actually adds the Unicode soft hyphen character, which is not shown unless it's at the end if a line, so I suspect that these extra characters confuse the renderer in the absence of the expected JS functions and cause problems with highlighting and selecting being offset.

EDIT: I found the post, #7 in this thread: https://www.mobileread.com/forums/sho...55&postcount=7

Last edited by jgoguen; 04-14-2013 at 06:05 AM.
jgoguen is offline   Reply With Quote