Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2018, 12:22 PM   #256
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by sherman View Post
Just tried this for the first time today. Can't give much feedback due to the afore mentioned touch issues,
Thanks for trying, I won't mind receiving feedback on 0.5.2.

Quote:
Originally Posted by sherman View Post
I thought that K&P line breaking tries to avoid hyphenation where possible, and especially tries to avoid subsequent hyphenation. And I've just seen three subsequent line breaks ending in a hyphen.
I noticed this when I was testing the renderer on various ePUBs and I misinterpreted the source of the problem. Indeed the value used for the consecutive-hyphens demerits was incorrect (100 instead of 3000)!
baskerville is offline   Reply With Quote
Old 11-18-2018, 12:36 PM   #257
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by Symptym View Post
It does seem to have broken the ability to select chapters in books using the menu from the bottom left however and every time I try to choose the chapter in my book again I get sent to the beginning of the last chapter.
This problem is present in the built-in ePUB renderer since its introduction.

Hence you should be able to reproduce with 0.5.2.
baskerville is offline   Reply With Quote
Advert
Old 11-18-2018, 12:40 PM   #258
Symptym
Junior Member
Symptym began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Nov 2015
Device: Kobo Aura HD
I was able to.

Seems that up to now I've somehow managed never needing to move between chapters.

A question about the adjusted metadata format;

Is there any way to convert the previous format to the new one?

ie. carry over the position in book and any bookmarks?
Symptym is offline   Reply With Quote
Old 11-18-2018, 02:23 PM   #259
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by Symptym View Post
A question about the adjusted metadata format;
Is there any way to convert the previous format to the new one?
Yes, there is. I will provide a script to do that when I release 0.5.4.
baskerville is offline   Reply With Quote
Old 11-18-2018, 08:47 PM   #260
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
So, I (hopefully) compiled the latest build, and set the paragraph breaker version to 0.4.0 in the Cargo.toml file before compiling.

First, interface is nice and clean, fast. Booklist is a good start. No series information, or book descriptions, which is a shame. Hoping more metadata in general could be added in the future.

The epub renderer appears to have less chance of subsequent hyphens, but it does still occur. I'm looking at a particularly egregious example right now, which is four consecutive hyphen line endings! Definitely still needs some fine tuning in my opinion.

Automatic ligatures would be a nice feature to include one day, as Plato doesn't appear to do this.

I'm not a fan of the right corner triggering the go-to-page box. It's very easy to hit accidentally. I haven't done any tweaking or configuration beyond default though, so I'm talking about default settings here.

Plato is certainly looking promising. I'm not ready to switch to it yet however, as the current RMSDK renderer is still superior at the moment (for epub). If the renderer can be further refined, and missing features added (I have plenty of books in my library that use tables and/or floats), I would be a very happy person.
sherman is offline   Reply With Quote
Advert
Old 11-21-2018, 05:07 AM   #261
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by sherman View Post
Booklist is a good start. No series information, or book descriptions, which is a shame. Hoping more metadata in general could be added in the future.
I might need a little help here: the book description comes from dc:description as far as I know, but how are the series and series index expressed in epub2, epub3 and kepub? I'm only aware of the non-standard meta name="calibre:series{,_index}".

Quote:
Originally Posted by sherman View Post
The epub renderer appears to have less chance of subsequent hyphens, but it does still occur. I'm looking at a particularly egregious example right now, which is four consecutive hyphen line endings!
I'll look into that. Please note that K&P isn't the only algorithm used.

Quote:
Originally Posted by sherman View Post
Automatic ligatures would be a nice feature to include one day, as Plato doesn't appear to do this.
Ligatures should be there: the liga OpenType feature is enabled by default in HarfBuzz.

Quote:
Originally Posted by sherman View Post
I'm not a fan of the right corner triggering the go-to-page box. It's very easy to hit accidentally. I haven't done any tweaking or configuration beyond default though, so I'm talking about default settings here.
I've also been bitten by this, I've therefore shrunk the corner regions in 19caa61.
baskerville is offline   Reply With Quote
Old 11-21-2018, 05:45 AM   #262
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by baskerville View Post
I might need a little help here: the book description comes from dc:description as far as I know, but how are the series and series index expressed in epub2, epub3 and kepub? I'm only aware of the non-standard meta name="calibre:series{,_index}".
The DC metadata standard doesn't include series info. There is something in the epub 3 standard. Otherwise, calibre series info is the closest to a standard.
davidfor is offline   Reply With Quote
Old 11-28-2018, 06:05 PM   #263
Namenlos
Enthusiast
Namenlos began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jul 2014
Device: Kobo Mini
Quote:
Originally Posted by baskerville View Post
mupdf's ePUB engine has several problems[…]I'm therefore in the process of writing an HTML renderer![…]
Have you considered using Webkit (or another html engine) and the Readium SDK? It seems promising, is open source, well documented and backed by companies (eink hardware and french libraries).
Namenlos is offline   Reply With Quote
Old 11-29-2018, 05:33 AM   #264
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
I've released 0.5.4.

The metadata format has changed and manual intervention is required. It might be a good practice to always backup your settings and metadata before upgrading. The attached Python script will perform the conversion:
Code:
./fix_metadata.py < .metadata.json > metadata.json
mv metadata.json .metadata.json
Please note that the script assumes that you haven't changed the value of reader.engine in Settings.toml.

List of changes:
  • Fix the reported rotation issue.
  • Fix chapter navigation in the built-in ePUB renderer.
  • Reduce the area of the corner regions to avoid unintentional activations.
  • Preload the next and previous pages.
  • Load the hyphenation patterns at runtime: you might want to remove the unneeded patterns in the hyphenation-patterns directory.
  • Limit the number of consecutive hyphens that the paragraph-breaker library might generate.
  • Decrease the size of the book title font.
  • Import more metadata from ePUBs.
  • Add a setting to trigger the auto import process at startup: import.startup-trigger.
  • Add a setting to traverse hidden directories during import: import.traverse-hidden.
  • Add a setting to set custom images for the suspend, power off and share intermissions: intermission-images. The setting can be set through the contextual menu of a book strip, in the Set As submenu.
Attached Files
File Type: py fix_metadata.py (619 Bytes, 168 views)
baskerville is offline   Reply With Quote
Old 11-29-2018, 11:34 AM   #265
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1

How can I make my own hyphenate file?
Is there a parameter to control the number of consecutive hyphens that the paragraph-breaker library might generate?
Good luck.
jcn363 is offline   Reply With Quote
Old 11-29-2018, 02:00 PM   #266
bn_el
Enthusiast
bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.bn_el is far more humble than you.
 
Posts: 34
Karma: 109062
Join Date: Aug 2016
Device: T62c, Kobo Aura 1
Thank you !
bn_el is offline   Reply With Quote
Old 11-29-2018, 02:35 PM   #267
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by Namenlos View Post
Have you considered using Webkit (or another html engine) and the Readium SDK?
I wrote an ePUB renderer from scratch.
baskerville is offline   Reply With Quote
Old 12-02-2018, 04:40 AM   #268
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by jcn363 View Post
How can I make my own hyphenate file?
The hyphenation patterns are generated by the hyphenation crate. Within the hyphenation repository, you can build the patterns with:
Code:
cargo build --features build_dictionaries
Quote:
Originally Posted by jcn363 View Post
Is there a parameter to control the number of consecutive hyphens that the paragraph-breaker library might generate?
The K&P algorithm doesn't provide such a parameter: it only returns the best solution satisfying the given constraints on the shrinking and stretching of the word spaces. I can only depreciate the subset of solutions that contains consecutive hyphens. But if all the solutions have consecutive hyphens then it won't help. The standard fit algorithm (used when K&P fails) forbids more that two consecutive hyphens.
baskerville is offline   Reply With Quote
Old 12-02-2018, 05:34 AM   #269
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by baskerville View Post
The hyphenation patterns are generated by the hyphenation crate. Within the hyphenation repository, you can build the patterns with:
Code:
cargo build --features build_dictionaries


The K&P algorithm doesn't provide such a parameter: it only returns the best solution satisfying the given constraints on the shrinking and stretching of the word spaces. I can only depreciate the subset of solutions that contains consecutive hyphens. But if all the solutions have consecutive hyphens then it won't help. The standard fit algorithm (used when K&P fails) forbids more that two consecutive hyphens.
The other area to tweak hyphenation is the actual hyphenation rules. For example, the hyphenation dictionary supplied with Kobo ereaders (and probably most other RMSDK readers) sets a minimum of five characters pre and post hyphen (so minimum ten character word). My personal tweak to this is to set it to three pre and post (so minimum six character word).
sherman is offline   Reply With Quote
Old 12-02-2018, 06:13 AM   #270
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by sherman View Post
The other area to tweak hyphenation is the actual hyphenation rules. For example, the hyphenation dictionary supplied with Kobo ereaders (and probably most other RMSDK readers) sets a minimum of five characters pre and post hyphen (so minimum ten character word). My personal tweak to this is to set it to three pre and post (so minimum six character word).
Those parameters are hardcoded (I guess I could fork the library). The current value for en-US is (2, 3).
baskerville is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) chrox KOReader 566 04-19-2024 05:28 AM
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill Kindle Developer's Corner 1268 02-27-2024 11:49 AM
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill KOReader 1219 01-27-2024 02:29 PM
v3 vs. v3+ as a pdf/DjVu reader hedonism_bot HanLin eBook 7 11-02-2010 08:16 PM


All times are GMT -4. The time now is 01:53 PM.


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