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 02-19-2015, 02:17 PM   #1
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
Instructions for patching firmware 3.13.1

Before starting:

1. Make sure your Kobo ereader is already running firmware version 3.13.1 (60d72c68d5).

2. Check that your battery is well charged.

3. Note that in Windows 8 the instructions below might require the batch file to be run in admistrator mode.


Patching from Windows, Linux (i386/x86_64), or Mac (OS X 10.8-10.9, i386/x86_64):

1. Download and extract patch_kobo_3131.zip (attached). [WARNING: If using Windows, make sure the path to the extracted files does not contain any '&' characters.]

2. Download the Kobo firmware archive version 3.13.1 for your device (See this thread) into the 3.13.1_source/ subdirectory. (Don't extract.)

3. Read and edit all the *.patch files in the 3.13.1_source/ subdirectory in order to: choose which patches to enable (patch_enable=`yes`) or disable (patch_enable=`no`); and to change some of the replacement values to suit your device and preferences. (See the section below on customising the patches.)

4. In Windows double-click 3.13.1.bat; For Linux/Mac open a terminal, change to the patch_kobo_3131/ directory, and run ./3.13.1.sh from the command line.

5. If there were no errors, copy the resulting KoboRoot.tgz from the 3.13.1_target/ subdirectory to the .kobo directory on your ereader.

6. Safely eject and unplug the device, which will then update and restart.


To return your ereader to its original unpatched state:

1. Edit all the 3.13.1_source/*.patch files to disable all patches (set patch_enable = `no` for every patch).

2. Repeat steps 4-6 of the procedure above.

.
Attached Files
File Type: zip patch_kobo_3131.zip (473.6 KB, 1661 views)

Last edited by GeoffR; 02-23-2015 at 05:17 AM. Reason: Updated attachment to include improved `KePub zero body margin/padding` patch.
GeoffR is offline   Reply With Quote
Old 02-19-2015, 02:23 PM   #2
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
Notes and other patches

Notes:

The following patches are missing from this version:

* Custom header styles
* Book titles font style normal


Improved `KePub zero body margin/padding` patch:

I've updated the `KePub zero body margin/padding` patch with an improved version. (See post #15.) The new patch fixes the problem some kepubs have of text being shifted right and cut off in full-screen mode, but unlike the old patch it doesn't prevent the margins being changed in normal reading mode.


New `Custom reading footer style` patch:

This patch has changed in this firmwre version, see post #12 for infomation.


New `Custom font sizes` patch:

The font sizes are different in this firmware version, they now vary depending on device:
Code:
Device            Unpatched          Patched default
------            ---------          ---------------
Touch/Mini:  12 - 90  (35 sizes)    12 - 80 (48 sizes)
Glo/Aura:    12 - 122 (43 sizes)    12 - 80 (48 sizes)
AuraHD/H2O:  12 - 150 (50 sizes)    12 - 88 (50 sizes)
Alyssum:     14 - 150 (48 sizes)    14 - 88 (48 sizes)

Working around problems with reading kepubs in full-screen mode:

To enable the full-screen reading option, add the following to the device's configuration file ./kobo/Kobo/Kobo eReader.conf using a unix-aware text editor (don't use Windows' Notepad or Wordpad, use an editor such as Notepad++ instead.)
Code:
[FeatureSettings]
FullScreenReading=true
Then it will be possible to switch between normal and full-screen mode by ticking the new "Show header and footer" box in the Reading Settings menu.

Full-screen mode works well with epubs, but there are two problems that affect kepubs:

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

For sideloaded kepubs this should be able to be fixed by adding the following to the book's stylesheet, or to kobo_extra.css if that option is enabled in Calibre:
Code:
body { margin: 0 0 0 0 !important; padding: 0 0 0 0 !important; }
For kepubs synced from Kobo, enabling the `KePub zero body margin/padding` patch will modify the device's built-in KePub stylesheet instead.


2. For some fonts, characters with a large side-bearing value (such as Georgia f, J, etc.) get cut off if they appear at the end of a line.

For sideloaded kepubs created by recent versions of Calibre's KoboTouchExtended driver, this can be fixed by adding the following to the book's stylesheet or to kobo_extra.css:
Code:
div#book-columns { padding: 0.2em !important; }
For kepubs synced from Kobo or created with older versions of the KoboTouchExtended driver, enabling the `Fix kepub side bearing font cut-off bug` patch will add the appropriate padding to the device's built-in stylesheet instead.


Advanced font options for sideloaded fonts.

The `Freedom to advanced fonts control` patch enables the weight/sharpness adjustment menu for sideloaded fonts. It works for both OTF and TTF fonts in the KePub reader, but usually only for TTF fonts in the epub reader.

To enable kepub kerning for sideloaded fonts, the font must be in TTF format with "Old style kern" tables. You can generate these tables with Fontforge by converting the font to TTF with the "Old style kern" option ticked. See this thread.


More patches:

* keyboard template patch, use this to create your own custom keyboard: post #24

* Turkish keyboard: post #25

`Default ePub monospace font`

`Change dicthtml strings to micthtml` (for use with custom dictionaries)

`Force user line spacing in ePubs` (A stronger replacement for the `Enforce user line spacing in ePubs` patch.)


If you know of any other patches for firmware 3.13.1 post them in this thread and I'll add them to this post.

Last edited by GeoffR; 10-17-2015 at 01:01 AM. Reason: Added link to `Force user line spacing in ePubs` patch.
GeoffR is offline   Reply With Quote
Advert
Old 02-19-2015, 02:28 PM   #3
Cesco
Connoisseur
Cesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipseCesco can illuminate an eclipse
 
Cesco's Avatar
 
Posts: 52
Karma: 8236
Join Date: Jul 2013
Location: Italy
Device: Kobo Aura 2-Aura H2O-K1-LibraH2O
you're amazing ... congratulations, and thanks for your work
Cesco is offline   Reply With Quote
Old 02-19-2015, 02:34 PM   #4
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
Quote:
Originally Posted by GeoffR View Post
Notes:

The following patches are missing:

* Custom font sizes
* Custom header styles
* Book titles font style normal

The following patches are incomplete:

* Custom reading footer style (only total footer height can be changed.)
The custom reading footer style, can we still get the text very close to the footer for RMDSK?
JSWolf is offline   Reply With Quote
Old 02-19-2015, 03:13 PM   #5
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 JSWolf View Post
The custom reading footer style, can we still get the text very close to the footer for RMDSK?
Yes, but I haven't yet found out how to add padding between the bezel and footer, or how to change the font size used for the page numbers.

Below is the first replacement string in the Custom reading footer style patch, I've highlighted the footer heights in red: Change the 24px values for Touch/Mini; the 30px values for Glo/Aura; and the 40px values for AuraHD/H2O.

replace_string = 0000, `ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 105;\n}\n\nReadingFooter[qApp_deviceIsPhoenix="true"] {\n\tmin-height: 82px;\n\tmax-height: 82px;\n}\n\nReadingFooter[qApp_deviceIsDragon="true"] {\n\tmin-height: 120px;\n\tmax-height: 120px;\n\tqproperty-footerMargin: 170;\n}`, `ReadingFooter {\n\tmin-height: 24px;\n\tmax-height: 24px;\n\tqproperty-footerMargin: 105;\n}\n\nReadingFooter[qApp_deviceIsPhoenix="true"] {\n\tmin-height: 30px;\n\tmax-height: 30px;\n}\n\nReadingFooter[qApp_deviceIsDragon="true"] {\n\tmin-height: 40px;\n\tmax-height: 40px;\n\tqproperty-footerMargin: 170;\n}`

Edit: Below is the second replacement string that affects the reading footer style. Font sizes can be changed (highlighted in red: Touch/Mini = 16px; Glo/Aura = = 20px; AuraHD/H2O = 26px; Alyssum = 30px; ) but problems arise when I try to add padding:

Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`

Last edited by GeoffR; 02-19-2015 at 10:00 PM. Reason: Added replacement string for font sizes
GeoffR is offline   Reply With Quote
Advert
Old 02-19-2015, 04:25 PM   #6
erikssenmar867
Connoisseur
erikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of light
 
Posts: 58
Karma: 12028
Join Date: Nov 2013
Device: Kobo Aura H2O
As always, I could not live without these patches
One question: will u try (if possible) to find the custom font size patch?
I don't like the values of this fw, specially I think that there are a lot of too small and too big sizes.
Thanks
erikssenmar867 is offline   Reply With Quote
Old 02-19-2015, 10:00 PM   #7
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 erikssenmar867 View Post
One question: will u try (if possible) to find the custom font size patch?
Yes I'll keep looking. The unpatched sizes are an improvement on previous firmware versions, but I would prefer more medium sizes too.
GeoffR is offline   Reply With Quote
Old 02-20-2015, 04:02 AM   #8
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
*stickied*
Alexander Turcic is offline   Reply With Quote
Old 02-20-2015, 09:12 AM   #9
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 font sizes

I have found a patch for the font sizes, it is a bit more more complicated than in the previous firmware as it tuns out the font size range now varies depending on the device type.

Spoiler:
Code:
<Patch>
patch_name = `Custom font sizes`
patch_enable = `yes`
#
# Unpatched font sizes now depend on the device's screen resolution:
#
#  Alyssum: 14px - 150px (48 sizes)
#  Dragon:  12px - 150px (50 sizes)
#  Phoenix: 12px - 122px (43 sizes)
#  Other:   12px - 90px  (35 sizes)
#
# Sizes increase in steps of 1 from the smallest size up to size 22, then in
# steps of 2 up to size 50, then in steps of 4 up to the largest size. 
#
# I don't know how many sizes are allowed, it is probably safe to use 50.
# This example results in the following ranges, with increases in steps of 1
# from the smallest size up to size 48, then steps of 2 up to size 60, then
# steps of 4 up to the largest size:
#
#  Alyssum: 14px - 88px (48 sizes)
#  Dragon:  12px - 88px (50 sizes)
#  Others:  12px - 80px (48 sizes)
#
# Start with this font size: (Alyssum, Others)
replace_int = 8DE83E, 14, 14
replace_int = 8DE842, 12, 12
#
# Add font sizes in increments of 1 until this size exceeded:
replace_int = 8DE872, 21, 47
#
# Continue from this font size:
replace_int = 8DE878, 22, 48
#
# Add font sizes in increments of 2 until this size exceeded:
replace_int = 8DE906, 49, 59
replace_int = 8DE922, 49, 59
#
# Continue from this font size:
replace_int = 8DE928, 50, 60
#
# Add font sizes in increments of 4 until this size exceeded:
# (Alyssum/Dragon, Phoenix, Others)
replace_int = 8DE850, 150, 88
replace_int = 8DE998, 122, 80
replace_int = 8DE99C, 90, 80
</Patch>


Try it out and let me know if you find any problems, or if the default size ranges should be different.

Edit: I've added this patch to the patch_kobo_3131.zip attachment in post #1

Last edited by GeoffR; 02-20-2015 at 09:13 PM. Reason: Added to post #1
GeoffR is offline   Reply With Quote
Old 02-20-2015, 10:02 AM   #10
erikssenmar867
Connoisseur
erikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of light
 
Posts: 58
Karma: 12028
Join Date: Nov 2013
Device: Kobo Aura H2O
Thanks Geoff! It seems to work!
I setted it in this way for my h2o: increment of 1 from 17 to 52; of two from 52 to 66; of 4 from 66 to 90

A question about other things: in the menu annotation, if you select the notebook view, the font size of annotations is too small... Do you think it's possible to correct it with a patch? (I remember a similar thing happened for the book synopsis, which you solved with a patch)
If it's not possible, don't worry about that..it's not a tragedy
erikssenmar867 is offline   Reply With Quote
Old 02-20-2015, 05:03 PM   #11
93terp
Fear The Turtle!
93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.93terp ought to be getting tired of karma fortunes by now.
 
93terp's Avatar
 
Posts: 866
Karma: 4035032
Join Date: Sep 2009
Location: Margaritaville
Device: KV, Kobo Forma, Kobo A1LE, KO3, K3
Thanks Geoff, patch is working great!
93terp is offline   Reply With Quote
Old 02-21-2015, 02:34 AM   #12
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 reading footer style patch

Here is a new `Custom reading footer style` patch. It allows most of the customisations possible with the patches from earlier firmare versions, but it does it a bit differently because it doesn't seem possible to add padding to the footer anymore, so you might need to use a bit of trial and error to get the footer exactly how you had it before.

Spoiler:
Code:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
# Multi-version patch: 3.13.1 - 3.13.1+
#
# This patch customises the following properties of the reading footer:
#
#  * Footer height (the amount of the screen reserved for the footer.)
#  * Caption font size (Caption = page number or other progress indicator)
#  * Caption top margin, which changes its vertical position within the footer.
#
# When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH
# OF THE REPLACEMENT STRING! If a replacement string is too long you will get
# an error when making the patch, but if one is too short then there will be no
# error, but strange things will happen to the reading footer.
#
find_base_address = `ReadingFooter {\n\tmin-height: 70px;`
#
# Replacement Footer height values: Touch/Mini
replace_string = 0011, `min-height: 70px;`, `min-height: 32px;`
replace_string = 0024, `max-height: 70px;`, `max-height: 32px;`
# Replacement Footer height values: Glo/Aura
replace_string = 0085, `min-height: 82px;`, `min-height: 40px;`
replace_string = 0098, `max-height: 82px;`, `max-height: 40px;`
# Replacement Footer height values: AuraHD/H2O
replace_string = 00DA, `min-height: 120px;`, `min-height: 052px;`
replace_string = 00EE, `max-height: 120px;`, `max-height: 052px;`
#
#
find_base_address = `#caption {\n\tfont-size: 16px;`
Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`, `#caption {font-size: 16px;margin-top: 00px;}\n#caption[qApp_deviceIsPhoenix="true"] {font-size: 20px;}\n#caption[qApp_deviceIsDragon="true"] {font-size: 26px;}\n#caption[qApp_deviceIsAlyssum="true"] {font-size: 30px;}\n#caption[qApp_localeName="ja_JP"] {font-family: A-OTF Gothic MB101 Pr6N;}`
#
# Replacement caption font size value for Touch/Mini:
replace_string = 000A, `font-size: 16px;`, `font-size: 16px;`
# Replacement caption font size value for Glo/Aura:
replace_string = 0054, `font-size: 20px;`, `font-size: 20px;`
# Replacement caption font size value for AuraHD/H2O:
replace_string = 008C, `font-size: 26px;`, `font-size: 26px;`
# Replacement caption font size value for Alyssum:
replace_string = 00C5, `font-size: 30px;`, `font-size: 30px;`
#
# Replacement caption top margin value for all devices:
# (A negative top margin moves the caption text upwards,
# further from the bezel and closer to the page content.)
replace_string = 001A, `margin-top: 00px;`, `margin-top:-10px;`
</Patch>


There are three properties you can customise:

1. The overall height of the footer, i.e. the amount of space reserved for displaying the footer that is not available to the book content. Do this by changing the min-height and max-height values.

2. The font size used for the footer.

3. The top margin for the footer text. This is the margin between the page number and the top of the footer, so choosing a negative top margin value will move the page number upwards, increasing the space between the page number and bezel, and reducing the space between the page number and the book content.

I haven't included the option to change the font family because I'm trying to keep it as simple as possible, and the new firmware fixes the problem of Gothic being used as the default footer font which was the motivation for changing the font family before.

If you have trouble getting the footer to match the one you had in earlier firmware, post the patch you used before and I'll give you my best guess for a new patch that is similar.

Edit: I've added this patch to patch_kobo_3131.zip attached to post #1.

Last edited by GeoffR; 02-21-2015 at 02:52 AM. Reason: Added patch to attachment in post #1
GeoffR is offline   Reply With Quote
Old 02-21-2015, 09:13 AM   #13
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by GeoffR View Post
Here is a new `Custom reading footer style` patch...
Just to let you know that I tried this new version on my H2O, customising all 3 options (height, font-size, bevel offset). It seems to be working fine. Thanks.
jackie_w is offline   Reply With Quote
Old 02-21-2015, 01:11 PM   #14
Ryzir
Connoisseur
Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.Ryzir solves Fermat’s last theorem while doing the crossword.
 
Posts: 65
Karma: 28684
Join Date: Dec 2009
Device: Nook GL3, Kobo H2O, Nook STG, Sony PRS-300, Sony PRS-500
Here are the settings I used on my H2O for the footer. First try and I'm happy with it.

Spoiler:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
# Multi-version patch: 3.13.1 - 3.13.1+
#
# This patch customises the following properties of the reading footer:
#
# * Footer height (the amount of the screen reserved for the footer.)
# * Caption font size (Caption = page number or other progress indicator)
# * Caption top margin, which changes its vertical position within the footer.
#
# When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH
# OF THE REPLACEMENT STRING! If a replacement string is too long you will get
# an error when making the patch, but if one is too short then there will be no
# error, but strange things will happen to the reading footer.
#
find_base_address = `ReadingFooter {\n\tmin-height: 70px;`
#
# Replacement footer height values: Touch/Mini
#replace_string = 0011, `min-height: 70px;`, `min-height: 32px;`
#replace_string = 0024, `max-height: 70px;`, `max-height: 32px;`
# Replacement footer height values: Glo/Aura
#replace_string = 0085, `min-height: 82px;`, `min-height: 40px;`
#replace_string = 0098, `max-height: 82px;`, `max-height: 40px;`
# Replacement footer height values: AuraHD/H2O
replace_string = 00DA, `min-height: 120px;`, `min-height: 038px;`
replace_string = 00EE, `max-height: 120px;`, `max-height: 038px;`
#
#
find_base_address = `#caption {\n\tfont-size: 16px;`
Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`, `#caption {font-size: 16px;margin-top: 00px;}\n#caption[qApp_deviceIsPhoenix="true"] {font-size: 20px;}\n#caption[qApp_deviceIsDragon="true"] {font-size: 26px;}\n#caption[qApp_deviceIsAlyssum="true"] {font-size: 30px;}\n#caption[qApp_localeName="ja_JP"] {font-family: A-OTF Gothic MB101 Pr6N;}`
#
# Replacement caption font size value for Touch/Mini:
#replace_string = 000A, `font-size: 16px;`, `font-size: 16px;`
# Replacement caption font size value for Glo/Aura:
#replace_string = 0054, `font-size: 20px;`, `font-size: 20px;`
# Replacement caption font size value for AuraHD/H2O:
#replace_string = 008C, `font-size: 26px;`, `font-size: 26px;`
# Replacement caption font size value for Alyssum:
#replace_string = 00C5, `font-size: 30px;`, `font-size: 30px;`
#
# Replacement caption top margin value for all devices:
# (A negative top margin moves the caption text upwards,
# further from the bezel and closer to the page content.)
replace_string = 001A, `margin-top: 00px;`, `margin-top:-10px;`
</Patch>
Attached Thumbnails
Click image for larger version

Name:	screen_001.png
Views:	1169
Size:	180.1 KB
ID:	135142  

Last edited by Ryzir; 02-21-2015 at 01:15 PM.
Ryzir is offline   Reply With Quote
Old 02-23-2015, 05:23 AM   #15
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
Improved `KePub zero body margin/padding` patch.

I've updated the `KePub zero body margin/padding` patch. (This patch fixes the problem with some kepubs in full-screen reading mode where the text is shifted to the right and cut off at the right margin.)

The new patch fixes the problem in full-screen mode, but unlike the old patch it doesn't prevent the margins being changed in normal reading mode.

Spoiler:
Code:
<Patch>
patch_name = `KePub zero body margin/padding`
patch_enable = `yes`
# Multi-version patch: 3.12.0 - 3.13.1+
#
# This patch adds the following to the built-in KePub stylesheet:
#
#   body{margin:0!important;padding:0!important}
#
# which solves the problem with the text of some KePubs being shifted to the
# right and cut off at the right margin in full-screen reading mode.
#
find_base_address = `\t\0.\0K\0B\0S\0t\0a\0c\0k\0K\0e\0y\0w\0o\0r\0d\0[\0w\0r\0i\0t\0i\0n\0g\0M\0o\0d\0e\0=\0"\0v\0e\0r\0t\0i\0c\0a\0l\0-\0r\0l\0"\0]\0`
#
replace_string = 0000, `\t\0.\0K\0B\0S\0t\0a\0c\0k\0K\0e\0y\0w\0o\0r\0d\0[\0w\0r\0i\0t\0i\0n\0g\0M\0o\0d\0e\0=\0"\0v\0e\0r\0t\0i\0c\0a\0l\0-\0r\0l\0"\0]\0 \0a\0 \0{\0 \0b\0o\0r\0d\0e\0r\0-\0r\0i\0g\0h\0t\0:\0 \01\0p\0x\0 \0s\0o\0l\0i\0d\0 \0b\0l\0a\0c\0k\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0 \0\t\0`, `.\0K\0B\0S\0t\0a\0c\0k\0K\0e\0y\0w\0o\0r\0d\0[\0w\0r\0i\0t\0i\0n\0g\0M\0o\0d\0e\0=\0"\0v\0e\0r\0t\0i\0c\0a\0l\0-\0r\0l\0"\0]\0 \0a\0{\0b\0o\0r\0d\0e\0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0t\0i\0n\0g\0M\0o\0d\0e\0=\0"\0v\0e\0r\0t\0i\0c\0a\0l\0-\0l\0r\0"\0]\0{\0b\0o\0r\0d\0e\0r\0-\0l\0e\0f\0t\0:\02\0p\0x\0 \0d\0o\0t\0t\0e\0d\0 \0b\0l\0a\0c\0k\0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0}\0b\0o\0d\0y\0{\0m\0a\0r\0g\0i\0n\0:\00\0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0p\0a\0d\0d\0i\0n\0g\0:\00\0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0}\0`
#
# The body rule inserted above takes effect in normal reading mode too, which
# interferes with another rule used to set the user margins in normal reading
# mode. To prevent that happening, the following change is made to increase the
# priority of the user margin setting rule:
#
#     body { margin: 0px %1% 0px %2% ! important;}\n
# --> html body{margin:0px %1% 0px %2%!important;}\n
#
find_base_address = `b\0o\0d\0y\0 \0{\0 \0m\0a\0r\0g\0i\0n\0:\0 \00\0p\0x\0 \0%\01\0%\0`
#
replace_string = 0000, `b\0o\0d\0y\0 \0{\0 \0m\0a\0r\0g\0i\0n\0:\0 \00\0p\0x\0 \0%\01\0%\0 \00\0p\0x\0 \0%\02\0%\0 \0!\0 \0i\0`, `h\0t\0m\0l\0 \0b\0o\0d\0y\0{\0m\0a\0r\0g\0i\0n\0:\00\0p\0x\0 \0%\01\0%\0 \00\0p\0x\0 \0%\02\0%\0!\0i\0`
</Patch>


Edit: New patch above, also added to patch_kobo_3131.zip attached to post #1.

Last edited by GeoffR; 02-24-2015 at 12:21 AM. Reason: Include new patch in this post and in patch_kobo_3131.zip in post #1
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
Instructions for patching firmware 3.12.1 GeoffR Kobo Developer's Corner 56 03-20-2015 05:14 AM
Instructions for patching firmware 3.12.0 GeoffR Kobo Developer's Corner 165 02-07-2015 09:22 AM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 07:28 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM
Instructions for patching firmware 3.1.1 GeoffR Kobo Developer's Corner 64 04-18-2014 01:23 PM


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


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