View Single Post
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