View Single Post
Old 12-05-2014, 12:50 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 more patches

Notes for firmware 3.12.0:

The number of different font sizes in the `Custom font sizes` patch has increased from 24 to 40 in this firmware version.

When reading kepubs with a low line spacing setting, a partial line of text can appear at the top or bottom of a page. To avoid this it is necessary to increase the line spacing a bit. See this screenshot for example, and see this post for what I think is causing the problem.


More patches for firmware 3.12.0:
If you know of any more patches for firmware 3.12.0 post them in this thread and I'll add them to this list:


The custom reading footer patch in the attachment to post #1 has a new layout: there are now three seperate patches for Touch/Mini, Glo/Aura, AuraHD/H2O; each patch has six example footer sizes.

Here is the old style patch (libnickel.so.1.0.0.patch):
Spoiler:
Code:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
replace_string = E359A4, `ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 105;\n}\n\nReadingFooter[qApp_deviceCodeName="phoenix"] {\n\tmin-height: 82px;\n\tmax-height: 82px;\n}\n\nReadingFooter[qApp_deviceCodeName="dragon"] {\n\tmin-height: 120px;\n\tmax-height: 120px;\n\tqproperty-footerMargin: 170;\n}\n\n* {\n\tfont-size: 16px;\n}\n\n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 20px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`, `ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 105;\n}\n\n* {\n\tfont-size: 16px;\n\tpadding-bottom: 0px;\n\tmargin-top: 0px;\n\t/*font-family:none;*/\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`
#
# Uncomment the replace_string lines of one of the examples below, comment out
# the rest. If you choose to make further changes to the examples, BE CAREFUL
# NOT TO ALTER THE LENGTH OF THE REPLACEMENT STRINGS! (Add or remove spaces if
# necessary to keep the total length the same.)
#
# Example for Touch/Mini:
#replace_string = E359B5, `min-height: 70px;`, `min-height: 32px;`
#replace_string = E359C8, `max-height: 70px;`, `max-height: 32px;`
#replace_string = E359E5, `footerMargin: 105;`, `footerMargin: 105;`
#replace_string = E35A00, `font-size: 16px;`, `font-size: 16px;`
#replace_string = E35A12, `padding-bottom: 0px;`, `padding-bottom: 4px;`
#replace_string = E35A28, `margin-top: 0px;`, `margin-top: 0px;`
#
# Example for Glo/Aura:
#replace_string = E359B5, `min-height: 70px;`, `min-height: 40px;`
#replace_string = E359C8, `max-height: 70px;`, `max-height: 40px;`
#replace_string = E359E5, `footerMargin: 105;`, `footerMargin: 105;`
#replace_string = E35A00, `font-size: 16px;`, `font-size: 20px;`
#replace_string = E35A12, `padding-bottom: 0px;`, `padding-bottom: 5px;`
#replace_string = E35A28, `margin-top: 0px;`, `margin-top: 0px;`
#
# Example for AuraHD/H2O:
#replace_string = E359B5, `min-height: 70px;`, `min-height: 50px;`
#replace_string = E359C8, `max-height: 70px;`, `max-height: 50px;`
#replace_string = E359E5, `footerMargin: 105;`, `footerMargin: 170;`
#replace_string = E35A00, `font-size: 16px;`, `font-size: 26px;`
#replace_string = E35A12, `padding-bottom: 0px;`, `padding-bottom: 8px;`
#replace_string = E35A28, `margin-top: 0px;`, `margin-top: 0px;`
#
# Uncomment one of the following if you wish the footer to use a fixed font.
# (And enable one of the Custom header style patches below with the same font.)
#
#replace_string = E35A3A, `/*font-family:none;*/`, `font-family:  Amasis;`
#replace_string = E35A3A, `/*font-family:none;*/`, `font-family:  Avenir;`
#replace_string = E35A3A, `/*font-family:none;*/`, `font-family: Georgia;`
#
</Patch>



A patch to display page numbers as 'x / y' instead of 'Page x of y' (libnickel.so.1.0.0.patch):
Spoiler:
Code:
<Patch>
patch_name = `Custom footer`
patch_enable = `yes`
#
# Changes the footer text with something shorter
# (not sure how it affects translations)
#
replace_string = D1BCE8, `Page %1 <i>of</i> %2`, `%1 / %2`
</Patch>



A patch to remove the white borders around book covers on the homescreen (libnickel.so.1.0.0.patch):
Spoiler:
Code:
<Patch>
patch_name = `Remove white borders from homescreen tile book covers`
patch_enable = `yes`
#PhoenixSmallRecentBookTile
replace_string = D59063, `coverBorder:4;`, `coverBorder:0;`
replace_string = D59134, `coverBorder:4;`, `coverBorder:0;`
#PocketRecentlyReadTile
replace_string = D5A02E, `coverBorder: 6;`, `coverBorder: 0;`
replace_string = D5A0F3, `coverBorder: 4;`, `coverBorder: 0;`
#RecentBookTile
replace_string = D5C4C8, `coverBorder:6;`, `coverBorder:0;`
replace_string = D5C580, `coverBorder:4;`, `coverBorder:0;`
replace_string = D5C667, `coverBorder:4;`, `coverBorder:0;`
#SmallRecentBookTile
replace_string = D5EDCE, `coverBorder:6;`, `coverBorder:0;`
</Patch>



A patch to squeeze a third row of book tiles onto the Glo/Aura homescreen, see this screenshot for example. (libnickel.so.1.0.0.patch):

Glo:
Spoiler:
Code:
<Patch>
patch_name = `Compact homepage layout (Glo)`
patch_enable = `yes`
#DragonHomePageView (Search bar height)
replace_string = D51AE8, `min-height:100px;`, `min-height:090px;`
replace_string = D51AFB, `max-height:100px;`, `max-height:090px;`
#QWidget (Space below search bar)
replace_string = D51C81, `min-height:40px;`, `min-height:08px;`
replace_string = D51C93, `max-height:40px;`, `max-height:08px;`
#MultiColumnTileView (Space between tiles)
replace_string = D51E31, `horizontalSpacing:10;`, `horizontalSpacing:04;`
replace_string = D51E52, `verticalSpacing:10;`, `verticalSpacing:04;`
#footer (Footer menu bar height)
replace_string = D5227E, `min-height:95px;`, `min-height:68px;`
replace_string = D52290, `max-height:95px;`, `max-height:68px;`
#PhoenixSmallRecentBookTile
replace_string = D59024, `percentFontSize:28;`, `percentFontSize:22;`
replace_string = D59043, `progressFontSize:22;`, `progressFontSize:22;`
#RecentBookTile
replace_string = D5C51B, `percentFontSize:28;`, `percentFontSize:22;`
replace_string = D5C540, `progressFontSize:22;`, `progressFontSize:22;`
</Patch>

Aura:
Spoiler:
Code:
<Patch>
patch_name = `Compact homepage layout (Aura)`
patch_enable = `yes`
#DragonHomePageView (Search bar height)
replace_string = D51AE8, `min-height:100px;`, `min-height:090px;`
replace_string = D51AFB, `max-height:100px;`, `max-height:090px;`
#QWidget (Space below search bar)
replace_string = D51C81, `min-height:40px;`, `min-height:02px;`
replace_string = D51C93, `max-height:40px;`, `max-height:02px;`
#MultiColumnTileView (Space between tiles)
replace_string = D51E31, `horizontalSpacing:10;`, `horizontalSpacing:02;`
replace_string = D51E52, `verticalSpacing:10;`, `verticalSpacing:02;`
#footer (Footer menu bar height)
replace_string = D5227E, `min-height:95px;`, `min-height:68px;`
replace_string = D52290, `max-height:95px;`, `max-height:68px;`
#PhoenixSmallRecentBookTile
replace_string = D59024, `percentFontSize:28;`, `percentFontSize:22;`
replace_string = D59043, `progressFontSize:22;`, `progressFontSize:22;`
#RecentBookTile
replace_string = D5C51B, `percentFontSize:28;`, `percentFontSize:22;`
replace_string = D5C540, `progressFontSize:22;`, `progressFontSize:22;`
</Patch>



A patch to customise the sleep and power-off timeout menus options (libnickel.so.1.0.0.patch):
Spoiler:
Code:
<Patch>
patch_name = `Custom Sleep/Power-off timeouts`
patch_enable = `yes`
# Values displayed on both menus
replace_string = DF5E0C, `5 mins\x00`, `10 mins`
replace_string = DF5E14, `10 mins`, `20 mins`
replace_string = DF5E1C, `15 mins`, `30 mins`
replace_string = DF5E24, `30 mins`, `1 hour`
replace_string = DF5E2C, `45 mins`, `2 hours`
replace_string = DF5E34, `60 mins`, `4 hours`
# Actual values used for sleep menu
replace_int = A6EF16, 5, 10
replace_int = A6EF60, 10, 20
replace_int = A6EFA4, 15, 30
replace_int = A6EFE8, 30, 60
replace_int = A6F02C, 45, 120
replace_int = A6F070, 60, 240
# Actual values used for power menu
replace_int = A6F124, 5, 10
replace_int = A6F168, 10, 20
replace_int = A6F1AA, 15, 30
replace_int = A6F1EA, 30, 60
replace_int = A6F22A, 45, 120
replace_int = A6F268, 60, 240
</Patch>



A patch to always (or never) turn on kepub hyphenation, regardless of justification setting. (libnickel.so.1.0.0.patch):
Spoiler:
Code:
<Patch>
patch_name = `Set kepub hyphenation`
patch_enable = `yes`
#
# The built-in kepub stylesheet has a line "* { -webkit-hyphenation: auto; }"
# to turn on hyphenation, but it is only used if the device's justification
# button is set to full justification. With this patch enabled hyphenation
# will always/never be turned on, regardless of justification button setting.
#
# (Note that if the publisher has set the hyphenation in the book's stylesheet
# then that will override the built-in stylesheet.)
#
# Alternative 1: Always turn kepub hyphenation on
replace_bytes = 9FE476, 5B F6 8C E1, 01 20 01 20
# Alternative 2: Never turn kepub hyphenation on
#replace_bytes = 9FE476, 5B F6 8C E1, 00 20 00 20
</Patch>



A patch to fix the kepub bug that cuts off letters with large side bearing (such as f) in full-screen mode. https://www.mobileread.com/forums/sho...&postcount=130


A patch to make the line spacing and justification settings selected from the reading settings (Aa) menu take effect on some epub books where they didn't before. https://www.mobileread.com/forums/sho...1&postcount=95


Patches to use a fixed font sharpness value in ePub / KePub books:
https://www.mobileread.com/forums/sho...4&postcount=96


An improved `ePub fixed/adjustable top/bottom margins` patch to replace the existing `ePub adjustable top/bottom margin` and `ePub fixed top/bottom margin` patches:
https://www.mobileread.com/forums/sho...&postcount=109

Attached are the main patches from post #1 for use with kpg.exe:
Attached Files
File Type: zip kpg_conf_3120.zip (6.4 KB, 2346 views)

Last edited by GeoffR; 01-18-2015 at 11:19 PM. Reason: Updated link to `Fix kepub side bearing font cut-off bug` patch.
GeoffR is offline   Reply With Quote