Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2015, 11:09 PM   #16
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Work-arounds for kepub problems in full-screen mode

(Note: From firmware version 3.19.5613 these three individual patches have been replaced by the single patch `Fix three KePub fullScreenReading bugs`.)

Firmware since version 3.3.0 has an undocumented FullScreenReading feature. (See Enabling undocumented features.) Full-screen reading mode works well with the EPUB reader, but there are three problems that affect the KEPUB reader:

Problem 1. If the kepub book's stylesheet has non-zero margin or padding on the body element, then the text is shifted to the right, possibly resulting in text being cut off at the right hand side.

For sideloaded kepubs this problem can be fixed without patching by adding body { margin: 0 !important; padding: 0 !important; } to the book's stylesheet (which can be done automatically when sending the book from Calibre by using the "Modify CSS" feature of the KoboTouch/KoboTouchExtended driver, or for selected books by using the "Append extra CSS" option of the Modify Epub plugin.)

For all kepubs both sideloaded and synced from Kobo, enabling the `KePub zero body margin/padding` patch will modify the device's built-in KePub stylesheet instead. The following screenshots (Glo, 3.12.1) show a kepub book synced from Kobo which exhibits this problem:
1. Unpatched,
2. Patched.
Click image for larger version

Name:	unpatched.png
Views:	3615
Size:	59.0 KB
ID:	139064Click image for larger version

Name:	patched.png
Views:	3516
Size:	60.6 KB
ID:	139065


Problem 2. For some fonts, characters with a large side-bearing value (such as Georgia italic f, J, etc.) get cut off if they appear at the end of a line. This problem can also affect kepubs in normal reading mode if the margin adjustment slider is set at minimum.

For sideloaded kepubs created by recent versions of Calibre's KoboTouchExtended driver, this problem can be fixed without patching by adding div#book-columns { padding: 0.2em !important; } to the book's stylesheet.

For most kepubs synced from Kobo or created with older versions of the KoboTouchExtended driver, the `Fix kepub side bearing font cut-off bug` patch can be used to add the appropriate padding to the device's built-in stylesheet instead. (Some changes to the default patch settings will be necessary for use with books in vertical languages such as Japanese, or ones created with old versions of the KoboTouchExtended driver.)

The following screenshots (Glo, 3.16.0) show a kepub book synced from Kobo in full-screen reading mode with a large font size to demonstrate the cut-off effect. Look at the letter f at the left of the fourth line from the bottom and at the right of the line above that to see the problem.
1. Unpatched
2. Patched
Click image for larger version

Name:	unpatched1.png
Views:	2758
Size:	103.0 KB
ID:	139270Click image for larger version

Name:	patched1.png
Views:	2651
Size:	103.0 KB
ID:	139271


Problem 3. Images which are supposed to be displayed inline (flowing with the text) are instead displayed centred on a seperate line.

This problem is can be fixed by applying the `Disable KePub FullSceenReading block img style` patch.

These screenshots (Glo, 3.18.0) show a page from this book which uses small bitmaps to represent some Hebrew letters. Note the second-to-last line of the page:
1. Unpatched
2. Patched
Click image for larger version

Name:	fsbug3-unpatched.png
Views:	2364
Size:	90.2 KB
ID:	144181 Click image for larger version

Name:	fsbug3-patched.png
Views:	2350
Size:	90.1 KB
ID:	144182

Last edited by GeoffR; 12-13-2015 at 05:51 PM. Reason: Added description of Problem 3.
GeoffR is offline   Reply With Quote
Old 06-08-2015, 04:58 AM   #17
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,013
Karma: 13471689
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by GeoffR View Post
The configuration file is a plain ASCII file with unix line breaks. When editing it, it is important to use an editor that doesn't change the file type or line break style. Most Linux and Mac text editors should be okay, but don't use Notepad or Wordpad in Windows: use an editor such as Notepad++ instead.
WordPad does work, Geoff. You can't create new LF-only ('Unix-style') text files with it (which you can do with Notepad++), but it will respect the line break style of existing files.

Notepad is indeed a no-no.
mbovenka is offline   Reply With Quote
Advert
Old 06-10-2015, 12:08 AM   #18
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by mbovenka View Post
WordPad does work, Geoff. You can't create new LF-only ('Unix-style') text files with it (which you can do with Notepad++), but it will respect the line break style of existing files.
Although Wordpad preserves the line breaks, I think it adds a useless byte order mark when saving ASCII files, which means they are no longer ASCII files. This can trip up programs that expect plain ASCII input.
GeoffR is offline   Reply With Quote
Old 06-12-2015, 05:23 AM   #19
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,013
Karma: 13471689
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by GeoffR View Post
Although Wordpad preserves the line breaks, I think it adds a useless byte order mark when saving ASCII files, which means they are no longer ASCII files. This can trip up programs that expect plain ASCII input.
OK, I didn't know that. I have used WordPad to edit Unix-style text files a few times in the past without mishap, but better safe than sorry. Notepad++ it is then (it's my default text editor anyway, nowadays).
mbovenka is offline   Reply With Quote
Old 06-14-2015, 07:44 AM   #20
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Custom keyboard patches

The keyboard in the unpatched firmware has a keypad of extended Latin letters that is accessed by tapping the ÉÀÇ key:
Click image for larger version

Name:	latin1.png
Views:	2654
Size:	26.3 KB
ID:	139272Click image for larger version

Name:	latin2.png
Views:	2302
Size:	25.6 KB
ID:	139273Click image for larger version

Name:	latin3.png
Views:	2310
Size:	26.5 KB
ID:	139274

It is possible to change the extended Latin letters to other letters with a custom keyboard patch. There are patches for Cyrillic, Arabic, Hebrew, and Turkish, or you can make up your own keypad just by replacing the letters in one of these patches:

Cyrillic (lower and upper case) and Arabic:
Click image for larger version

Name:	cyrillic2.png
Views:	2549
Size:	25.7 KB
ID:	139276Click image for larger version

Name:	cyrillic3.png
Views:	2320
Size:	26.2 KB
ID:	139277Click image for larger version

Name:	arabic2.png
Views:	2219
Size:	25.1 KB
ID:	139279

Note that the glyphs for Arabic and Hebrew are not available when the device first boots, so the keyboard will just show blank squares until the first time the Aa menu inside a book is opened.

The screenshots above are from my Glo (fw 3.16.0), the keyboards on other devices are a little different.

Last edited by GeoffR; 06-14-2015 at 07:48 AM.
GeoffR is offline   Reply With Quote
Advert
Old 06-29-2015, 01:33 PM   #21
avresbo
Enthusiast
avresbo began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jan 2010
Device: Kobo Glo HD / Kobo Libra H2O
Are these patches good for a Glo hD?
I own a GLO HD with update 3.16.0

Thank you very much in advance.
avresbo is offline   Reply With Quote
Old 06-30-2015, 01:51 AM   #22
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 34,557
Karma: 144552660
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by avresbo View Post
Are these patches good for a Glo hD?
I own a GLO HD with update 3.16.0

Thank you very much in advance.
Yes, they will work with the Glo HD. If you haven't already found it, check the Instructions for patching firmware 3.16.0 thread for more information.

Last edited by DNSB; 06-30-2015 at 01:53 AM.
DNSB is offline   Reply With Quote
Old 07-21-2015, 01:01 AM   #23
pickyaxe
Addict
pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.
 
Posts: 285
Karma: 3762916
Join Date: Nov 2011
Device: none
Patch request, hopefully this is possible. Thanks!

when you select "remove" for a Pocket article, either by touch and holding from the article list or by selecting it from the reading screen, you get a confirmation box that says "Remove from..." with two checkboxes: "eReader" and "Pocket account".
By default the "eReader" checkbox is always checked and "Pocket account" always unchecked, and whether or not each checkbox is checked is not remembered between subsequent deletes (very frustrating).
I want both to be checked by default, because when I'm removing it is always because I want to remove from my account.
pickyaxe is offline   Reply With Quote
Old 07-30-2015, 12:54 PM   #24
mortimer7
Connoisseur
mortimer7 has learned how to read e-booksmortimer7 has learned how to read e-booksmortimer7 has learned how to read e-booksmortimer7 has learned how to read e-booksmortimer7 has learned how to read e-booksmortimer7 has learned how to read e-booksmortimer7 has learned how to read e-books
 
Posts: 70
Karma: 798
Join Date: Apr 2012
Device: iLiad, Kobo Aura 6"
Great job GeoffR!
Can You add an indicator like FBReader?
mortimer7 is offline   Reply With Quote
Old 07-30-2015, 01:01 PM   #25
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
@Mortimer7: you do realize that these are just patches to the supplied code; ie: overriding a few instructions or data values in the supplied Kobo code; NOT totally adding major functionality (ie the display across the bottom of the screen).

Also, as has been discussed previously, displaying a changing clock on an eInk device is not overly practical or efficient.
PeterT is offline   Reply With Quote
Old 07-31-2015, 04:41 AM   #26
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by PeterT View Post
Also, as has been discussed previously, displaying a changing clock on an eInk device is not overly practical or efficient.
1st of all, I understand the difference between adding things to code that are totally new, and patch things by altering values that are already there.
Having said that,there is a clock displaying at the top for a couple of seconds when you use the settings bar at top of bottom.
So kobo also thinks that a clock adds something.
Sure I would not use it to wait for my train or plane, but as indication such an option would be nice.
Sure I understand that only when you tap for a new page the clock would be updated so if you are on a page for 10 minutes,the clock stands still that 10 minutes.
But also for the guys who made patches and hacks they provide the Sony readers with such a function.
But again,that is not a question for a patch topic,as you point out correctly.
But,it is there at the top,hidden,visible at the moment you use the options on the reader for 5 or 10 seconds..so there is some code..

The problem would be,if you make it 100% visible at all times on the top,it must disappear when using the options or you get a sort of "subtitles over subtitling effect".
So I would not use it for boiling an egg, but if you are reading in night,only using the light of the reader,some time indication can be handy.
My watch (also e-ink) isn't lighted,neither as my clock or phone.
So I have to enter the options part and leave it to see the time for that couple of seconds and those extra steps are distracting me.
So I understand the question and I would like something to,but I would ask it in a new topic in the dev corner for some programmer to read it,and hope it would not end in a debate if it is handy or not.
Nick_1964 is offline   Reply With Quote
Old 07-31-2015, 09:12 AM   #27
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
Quote:
Originally Posted by PeterT View Post
Also, as has been discussed previously, displaying a changing clock on an eInk device is not overly practical or efficient.
Clock is a kind of must have for myself. On all my Sony ebook readers I had clock. It wasn't always "live" (changing time as time changes, not with page turns), but it was there.

Now on Kobo, I know that you can have clock with koreader and coolreader (not live ones though).

From programing point of view, I'm sure it could be done with live clock also. Not that I myself know how to do that, but seeing how ebook software works, I'm sure it could be done, to change small portion of screen where clock is to place new information every minute (it actually could be possible to change it every second from technical point of view, but that's a bit overkill).

Having clock is one of reasons why now I use koreader exclusively. And I'm happy with it. Of course, that's just my opinion and how I look on question of having clock visible in footer versus not having clock and need to go and find it somewhere in menus.
Alan_S is offline   Reply With Quote
Old 07-31-2015, 06:40 PM   #28
pickyaxe
Addict
pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.
 
Posts: 285
Karma: 3762916
Join Date: Nov 2011
Device: none
You don't need to find the clock in a menu. A single tap reveals the top and bottom toolbar. The clock is displayed in the middle of the toolbar. Then, a second tap hides it.

This is very fast, about as fast as turning your wrist and looking at your watch. Plus it doesn't take space for a persistent HUD like KOreader/Coolreader (I can't comprehend how anyone would ever want a persistent HUD, but to each his own).



Respectfully, I'm asking for the remove from Pocket checkboxes patch one more time
pickyaxe is offline   Reply With Quote
Old 08-01-2015, 07:58 AM   #29
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
Well, we are talking about preferences. With koreader, you can remove status bar (you call it HUD). On the other hand, I'd like to keep my eye on a clock. It just takes quick glance with my eyes.

I guess that's my wee obsession.
Alan_S is offline   Reply With Quote
Old 08-01-2015, 10:40 PM   #30
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by mortimer7 View Post
Can You add an indicator like FBReader?
In short, no.

Changing the progress indicator from "Page X of Y" into a horizontal bar of width (X/Y*100) percent of the screen width might be possible, but even that would be a lot of work and not something I would want to spend the time on for a feature I would never use (someone else might if they wanted it enough.)

Adding the chapter marks would be a whole different level of difficulty though, it would probably be much easier to convince Kobo to add the feature than it would be to make a patch.


Quote:
Originally Posted by pickyaxe View Post
Patch request, hopefully this is possible. Thanks!

when you select "remove" for a Pocket article, either by touch and holding from the article list or by selecting it from the reading screen, you get a confirmation box that says "Remove from..." with two checkboxes: "eReader" and "Pocket account".
By default the "eReader" checkbox is always checked and "Pocket account" always unchecked, and whether or not each checkbox is checked is not remembered between subsequent deletes (very frustrating).
I want both to be checked by default, because when I'm removing it is always because I want to remove from my account.

That is probably a simple patch once the location in the code controlling the tickbox is found, but finding it in the first place can take time. I don't use Pocket myself, but it sounds like the same popup that appears when you delete a synced kepub.
GeoffR 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
Unofficial Sigil patches varlog Sigil 8 11-12-2014 06:14 PM
Index: Making a linked index in epub virtual_ink ePub 21 10-19-2011 11:23 PM
DR800 Long time to index files after upgrading firmware? Albyr iRex 29 06-18-2011 05:23 PM
How to apply the enhancements/patches ? nubbol Calibre 2 09-04-2010 11:42 PM
iLiad Applying DR GTK+ patches to iLiad ericshliao iRex Developer's Corner 16 03-14-2010 05:39 AM


All times are GMT -4. The time now is 10:42 AM.


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