View Single Post
Old 05-31-2016, 03:40 PM   #146
Josieb1
Grand Sorcerer
Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.
 
Posts: 5,090
Karma: 18051062
Join Date: Nov 2009
Location: UK
Device: Kindle Scribe, Coloursoft, PW SE, Kindle 6, Kobo Libra 2, Clara BW
Here is the whole new Libernickel patch, the one that won't generate a new tgz file

Spoiler:
# libnickel.so.1.0.0 in firmware 3.19.5761 (0e028f3185)
# For use by patch32lsb v0.10 or later.

#
# Lines beginning with '#' (such as this one) are treated as comments (ignored.)
# To 'comment out' a line means to insert a '#' character at the beginning.
# To 'uncomment' a line means to remove the '#' character from the beginning.
# Some patch options are commented out, and can be enabled by uncommenting.
#


#
# The following two patches are alternatives, don't enable both at once.
#
# `Disable reading footer`
# `Custom reading footer style`
#

<Patch>
patch_name = `Disable reading footer`
patch_enable = `no`
# Multi-version patch: 3.19.5613 - 3.19.5761+
# patch_group = `Reading footer alternatives`
#
## Removes the reading footer for both ePub and KePub books, leaving a 15px
## bottom margin which matches the 15px built-in top margin of ePub books.
#
find_base_address = `ReadingFooter {\n\tqproperty-footerMargin: 105;\n}\n\n`
replace_string = 0000, `ReadingFooter {\n\tqproperty-footerMargin: 105;\n}\n\n`,`ReadingFooter{min-height:15px;max-height:15px;}\n`
#
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}`, `#caption{font-size:1px;color:transparent;}\n`
</Patch>


<Patch>
patch_name = `Custom reading footer style`
patch_enable = `no`
# Multi-version patch: 3.19.5613 - 3.19.5761+
# patch_group = `Reading footer alternatives`
#
## 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.
## * Caption font family.
#
# 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\tqproperty-footerMargin: 105;\n}\n\n`
replace_string = 0000, `ReadingFooter {\n\tqproperty-footerMargin: 105;\n}\n\nReadingFooter[qApp_deviceIsDragon="true"] {\n\tqproperty-footerMargin: 170;\n}`, `ReadingFooter { qproperty-footerMargin: 105; min-height: 70px; max-height: 70px; }`
#
# Example replacement footer height values: Touch/Mini
#replace_string = 001A, `footerMargin: 105;`, `footerMargin: 105;`
#replace_string = 002D, `min-height: 70px;`, `min-height: 32px;`
#replace_string = 003F, `max-height: 70px;`, `max-height: 32px;`
# Example replacement footer height values: Glo/Aura
replace_string = 001A, `footerMargin: 105;`, `footerMargin: 105;`
replace_string = 002D, `min-height: 70px;`, `min-height: 40px;`
replace_string = 003F, `max-height: 70px;`, `max-height: 40px;`
# Example replacement footer height values: AuraHD/H2O/GloHD
#replace_string = 001A, `footerMargin: 105;`, `footerMargin: 170;`
#replace_string = 002D, `min-height: 70px;`, `min-height: 52px;`
#replace_string = 003F, `max-height: 70px;`, `max-height: 52px;`
#
#
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: Sans-SerifJP;\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: Sans-SerifJP;}`
#
# 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 GloHD:
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;`
#
# Uncomment to use a fixed replacement caption font family, for all devices:
# (You can change Avenir to another font name of your choice, but Avenir or
# Georgia are recommended because other fonts may not be loaded when the book
# is first opened and so might cause problems. Unlike other strings it is OK
# if this replacement string is a bit longer or shorter than the original.)
#replace_string = 00D7, `#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`, `#caption {font-family: Georgia;}
</Patch>


<Patch>
patch_name = `My 15 line spacing values`
patch_enable = `yes`
#
## This patch changes the line spacing set by the line spacing adjustment
## slider, allowing much narrower line spacing to be set. It is recommended to
## select your own custom spacings by editing the replace_float lines at the
## bottom of this patch, as the defaults will not suit everyone.
#
# load val1 from new table
replace_bytes = 616E2C, 00 23 00 22 C3 F6 F0 73, 00 46 40 A3 D3 E9 00 23
# load val5 from new table
replace_bytes = 616E84, 43 F2 33 33 4F F0 33 32, 2C A3 D3 E9 00 23 00 46
replace_bytes = 616E8C, C3 F6 F3 73, 00 46 00 46
# load val7 from new table
replace_bytes = 616EB2, 00 23 00 22 C3 F6 F8 73, 00 46 22 A3 D3 E9 00 23
# load val10 from new table
replace_bytes = 616EF0, 00 22 4F F0 80 43, 15 A3 D3 E9 00 23
# load val11-val14 from old table in a loop to make room for new table
replace_bytes = 616F04, 48 A3 D3 E9 00 23 07 F1, 48 A7 00 26 D7 E9 00 23
replace_bytes = 616F0C, 80 01 20 46 61 E9 0A 23, 20 A9 31 44 61 E9 0A 23
replace_bytes = 616F14, FC F5 48 E8 45 A3 D3 E9, 20 46 FC F5 48 E8 08 36
replace_bytes = 616F1C, 00 23 07 F1 80 01 20 46, 08 37 20 2E F2 D1 00 AF
# load val15 from new table, jump over new table
replace_bytes = 616F24, 61 E9 08 23 FC F5 3E E8, 0A A3 D3 E9 00 23 17 E0
# new table, inial values 1.0, 1.2, 1.5, 2.0, 3.0
replace_bytes = 616F30, 00 23 07 F1 80 01 20 46, 00 00 00 00 00 00 F0 3F
replace_bytes = 616F38, 61 E9 06 23 FC F5 34 E8, 33 33 33 33 33 33 F3 3F
replace_bytes = 616F40, 3F A3 D3 E9 00 23 07 F1, 00 00 00 00 00 00 F8 3F
replace_bytes = 616F48, 80 01 20 46 61 E9 04 23, 00 00 00 00 00 00 00 40
replace_bytes = 616F50, FC F5 2A E8 00 23 00 22, 00 00 00 00 00 00 08 40
#
# 15 values for replacement, change these to suit:
replace_float = 616F30, 1.0, 0.7
replace_float = 616FF8, 1.05, 0.75
replace_float = 617000, 1.07, 0.8
replace_float = 617008, 1.1, 0.82
replace_float = 616F38, 1.2, 0.84
replace_float = 617010, 1.35, 0.86
replace_float = 616F40, 1.5, 0.88
replace_float = 617018, 1.7, 0.9
replace_float = 617020, 1.8, 0.92
replace_float = 616F48, 2.0, 0.94
replace_float = 617028, 2.2, 0.96
replace_float = 617030, 2.4, 0.98
replace_float = 617038, 2.6, 1.0
replace_float = 617040, 2.8, 1.05
replace_float = 616F50, 3.0, 1.1
#
# The 15 line spacing values above should allow the line spacing to be adjusted
# in increments of one pixel when using a medium sized font on a high resolution
# device. If you use a small font size and/or a lower resolution device you may
# find that increasing the slider one step at a time doesn't always result in a
# line spacing change at each step. In that case, you might want to use 15
# replacement values that are not quite so close together. For example:
#
# 0.7 0.75 0.8 0.825 0.85 0.875 0.9 0.925 0.95 0.975 1.0 1.05 1.1 1.15 1.2
#
# Also note that the KEPUB reader has problems when the line spacing value is
# set too low, depending on the font used. Most of the built-in fonts are okay
# down to about 0.9. If you only read KePub books then you might want to remove
# some of the lower values and add some more of the higher ones. For example:
#
# 0.9 0.925 0.95 0.975 1.0 1.025 1.05 1.075 1.1 1.15 1.2 1.25 1.3 1.35 1.4
#
</Patch>


<Patch>
patch_name = `Custom left & right margins`
patch_enable = `yes`
# Multi-version patch: 2.8.1 - 3.19.5761+
#
## This patch sets the size of the margins added by the margins adjustment
## slider, as a percentage of screen width.
#
find_base_address = `\0\0\0\0\x02\0\0\0\x04\0\0\0\x06\0\0\0\x08\0\0\0\ x0A\0\0\0\x0C\0\0\0\x0E\0\0\0\x10\0\0\0`
# 9 values for replacement:
replace_int = 0000, 00, 00
replace_int = 0004, 02, 01
replace_int = 0008, 04, 02
replace_int = 000C, 06, 03
replace_int = 0010, 08, 04
replace_int = 0014, 10, 05
replace_int = 0018, 12, 06
replace_int = 001C, 14, 07
replace_int = 0020, 16, 08
</Patch>


<Patch>
patch_name = `Custom font sizes`
patch_enable = `no`
#
## Unpatched font sizes depend on the device's screen resolution:
##
## GloHD: 14px - 150px (48 sizes)
## AuraHD/H2O: 12px - 150px (50 sizes)
## Glo/Aura: 12px - 122px (43 sizes)
## Touch/Mini: 12px - 90px (35 sizes)
##
## Unpatched 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, but it is probably safe to use 50.
##
## The example replacement values in this patch result 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:
##
## GloHD: 14px - 88px (48 sizes)
## AuraHD/H2O: 12px - 88px (50 sizes)
## Glo/Aura: 12px - 80px (48 sizes)
## Touch/Mini: 12px - 80px (48 sizes)
#
# Start with this font size: (GloHD, Others)
replace_int = 8C95B6, 14, 14
replace_int = 8C95BA, 12, 12
#
# Add font sizes in increments of 1 until this size exceeded:
replace_int = 8C95EC, 21, 47
#
# Continue from this font size:
replace_int = 8C95F2, 22, 48
#
# Add font sizes in increments of 2 until this size exceeded:
replace_int = 8C9680, 49, 59
replace_int = 8C969C, 49, 59
#
# Continue from this font size:
replace_int = 8C96A2, 50, 60
#
# Add font sizes in increments of 4 until this size exceeded:
# (GloHD/AuraHD/H2O, Glo/Aura, Touch/Mini)
replace_int = 8C95C6, 150, 88
replace_int = 8C9712, 122, 80
replace_int = 8C9716, 90, 80
</Patch>


<Patch>
patch_name = `Brightness fine control`
patch_enable = `yes`
#
## Tapping the sun symbols increases/Decreases the frontlight brightness by 1
## instead of by 10.
#
replace_int = 8A21C2, 10, 01
replace_int = 8A21F2, 10, 01
</Patch>


<Patch>
patch_name = `Search in Library by default`
patch_enable = `yes`
#
## Tapping the search bar on the home screen defaults to Library search
## instead of Bookstore search.
#
# SearchEditBox.setSearchType(0) --> SearchEditBox.setSearchType(1)
replace_bytes = 952056, 41 46, 01 21
</Patch>


<Patch>
patch_name = `Freedom to advanced fonts control`
patch_enable = `yes`
#
## This patch allows the advanced font options (weight/sharpness adjustments)
## to work with sideloaded fonts too. (KEPUB: OTF and TTF. EPUB: TTF only.)
##
## WARNING: IT IS NOT SAFE TO ENABLE THIS PATCH IF YOUR DEVICE IS SET TO A
## JAPANESE LOCALE OR JAPANESE BOOKS ARE OPENED.
#
# VolumeManager.isJapanese(a) --> False
replace_bytes = 61466C, F0 F5 36 E9, 00 20 00 20
# N3FontTypeUtil.setupMonotypeDropdown(b,c)
# --> N3FontTypeUtil.setupDropdown(UNDEFINED,b,c) e31890 412ed8
replace_bytes = 79637A, 58 46 51 46, 59 46 52 46
replace_bytes = 79637E, 66 F4 94 EC, 7C F4 AC ED
# N3FontTypeController.setupAdvancedOption --> NOP
replace_bytes = 8C6360, 60 F7 C0 E5, 00 46 00 46
replace_bytes = 8C7a46, 5F F7 4E E2, 00 46 00 46
</Patch>


<Patch>
patch_name = `Allow download all in Browser`
patch_enable = `no`
#
## Allow the browser to download any file, not just the types it recognises.
#
replace_bytes = 7D47D0, 50 F4 E0 E9, 01 20 01 20
</Patch>


#
# The following two patches are mutually incompatible, don't enable both.
#
# `ePub fixed/adjustable top/bottom margins`
# `ePub disable built-in body padding-bottom`
#

<Patch>
patch_name = `ePub fixed/adjustable top/bottom margins`
patch_enable = `no`
# patch_group = `ePub padding-bottom alternatives`
#
## This patch sets the @page margin sizes in epubs, overriding any @page margin
## set in the book's CSS stylesheet (but not in the XPGT stylesheet, see below).
##
## By default the top and bottom margins are set to be adjustable, their size
## similar to the left/right margin size set by the adjustment slider. There
## are options to set the top and/or bottom margin to a fixed size instead.
##
## Note that @page margins are seperate from (and overlap) both the body margins
## set in the book and the left/right margins set from the adjustment slider,
## and are added to any page margins set in the Adobe XPGT stylesheet if the
## book has one (e.g. page-template.xpgt). For this reason you might want to
## consider using the Modify ePub Calibre plugin to remove any body margins and
## XPGT stylesheet margins before sideloading the book, or perhaps enabling the
## `Ignore ePub Adobe XPGT stylesheet (page-template.xpgt)` patch.
##
## Also note that a side-effect of this patch is that the body padding-bottom is
## removed from the built-in stylesheet, which means that there will no longer
## be a blank line added automatically at the end of chapters.
##
## See at the bottom of the patch for replacement values that can be used to
## tune the size of the margins to suit different devices and reading modes.
#
#
# Push an extra 8 bytes of scratch space onto the stack
replace_bytes = 4742FA, BD B0, BF B0
replace_bytes = 474300, 02 AF, 04 AF
# Save this value for the third stack argument of our later function call
replace_bytes = 474662, AD F8 04 20, 02 92 01 92
# getReadingLineHeight(...) --> getReadingLeftMargin(...) e2fbb0 40d290
replace_bytes = 4746B0, B5 F7 78 EA, 98 F7 EE ED
#
replace_bytes = 4746B4, 20 22 4F F0 FF 33, 00 23 01 22 0A 21
replace_bytes = 4746BA, 07 F1 50 0A, 00 93 01 91
replace_bytes = 4746BE, AD F8 04 20 00 93, 42 43 92 08 01 3A
replace_bytes = 4746C4, 50 46 29 46, B8 BF 00 22
replace_bytes = 4746C8, 00 22 67 23, 18 A8 29 46
# QString.arg(double, ...) --> QString.arg(int64, ...) e2f91c 40ca54
replace_bytes = 4746CC, A3 F7 84 EA, 98 F7 C2 E9
# mov r1,sl; --> adds r1,sp,#96
replace_bytes = 4746D2, 51 46, 18 A9
# (Remember to pop scratch space if necessary)
#
# padding-bottom: %1em !important;\n
# --> }@page{margin:%1px 00px %1px}body{
replace_string = B8A188, `\x20\0p\0a\0d\0d\0i\0n\0g\0-\0b\0o\0t\0t\0o\0m\0:\0 \0%\01\0e\0m\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0\n\0`, `}\0@\0p\0a\0g\0e\0{\0m\0a\0r\0g\0i\0n\0:\0%\01\0p \0x\0 \00\00\0p\0x\0 \0%\01\0p\0x\0}\0b\0o\0d\0y\0{\0`
#
#
# *** Replacement values start here, don't change anything above ***
#
# Optional replacement value: Uncomment for a FIXED TOP MARGIN size in px,
# default 25px. Replacement value is margin size, two digits separated by \0
# (Leave commented out for an adjustable top margin.)
#replace_string = B8A1A4, `%\01`, `2\05`
#
# Optional replacement value: Uncomment for a FIXED BOTTOM MARGIN size in px,
# default 00px. Replacement value is margin size, two digits separated by \0
# (Leave commented out for an adjustable bottom margin.)
#replace_string = B8A1B8, `%\01`, `0\00`
#
# Optional replacement value: Uncomment to set the minimum LEFT/RIGHT MARGIN
# size in px, default 15px. (This margin will overlap the left/right margin
# set with the adjustment slider, not add to it.) Replacement value is margin
# size, two digits separated by \0
#replace_string = B8A1AE, `0\00`, `1\05`
#
# Replacement value: Sets the step-size of the ADJUSTABLE top/bottom margin
# (if any) in quarter-pixels. These suggested values should be very close to
# the 1% step size of the left/right margins set by the slider. Larger values
# will make the top/bottom margins larger than the left/right margins.
# Suggested values: 24 (Touch/Mini), 30 (Glo/Aura), 43 (AuraHD/H2O/GloHD)
replace_int = 4746B6, 1, 30
#
# Replacement value: Set this to the size of the device's built-in top margin,
# in pixels. This value is subtracted from the adjustable top/bottom margin
# (if any) to compensate for any unremovable built-in top margin.
# Suggested values are:
# 0 For full-screen reading mode (fullScreenReading=true, all devices)
# 15 for normal reading mode (Glo/GloHD, not sure for other devices)
replace_int = 4746C2, 1, 0
</Patch>


<Patch>
patch_name = `ePub disable built-in body padding-bottom`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
# patch_group = `ePub padding-bottom alternatives`
#
## The built-in ePub stylesheet adds a line of padding at the bottom of the
## body element, to prevent the chapter ending on the last line of a page.
## This patch disables that stylesheet entry.
##
## This patch is not compatible with `ePub fixed/adjustable top/bottom margins`
## patch, which already removes this stylesheet entry to make room for other
## things.
#
# padding-bottom: %1em !important;\n
# --> _adding-bottom: %1em !important;\n
#
find_base_address = `\x20\0p\0a\0d\0d\0i\0n\0g\0-\0b\0o\0t\0t\0o\0m\0:\0 \0%\01\0e\0m\0`
replace_string = 0002, `p`, `_`
</Patch>


#
# The following two patches are alternatives, don't enable more than one.
#
# `Custom page refresh options (1,2,3,...,12)`
# `Custom page refresh options (1,2,4,8,16,32,64,128)`
#
# These two patches don't affect the Aura. See below for Aura-only patches.
#

<Patch>
patch_name = `Custom page refresh options (1,2,3,...,12)`
patch_enable = `yes`
# patch_group = `Page refresh alternatives`
#
## Allows the page refresh to be set in the range 1-12 pages,
## instead of just 1-6 pages. This patch doesn't affect the Aura.
#
# cmp r5, #7; bne.n; --> cmp r5, #6; bls.n;
replace_bytes = 79C368, 07 2D 9A D1, 06 2D 9A D9
#
# Replacement: Base (use this value for the first menu option):
replace_int = 79C298, 1, 1
# Replacement: Increment (add this value to get each successive menu option):
replace_int = 79C366, 1, 1
# Replacement: Maxmium (stop adding options when this value is exceeded):
replace_int = 79C368, 6, 12
</Patch>


<Patch>
patch_name = `Custom page refresh options (1,2,4,8,16,32,64,128)`
patch_enable = `no`
# patch_group = `Page refresh alternatives`
#
## Allows the page refresh to be set to 1,2,4,8,16,32,64, or 128 pages,
## instead of just 1-6 pages. This patch doesn't affect the Aura.
#
# cmp r5, #7; bne.n; --> cmp r5, #6; bls.n;
replace_bytes = 79C368, 07 2D 9A D1, 06 2D 9A D9
#
# Replacement: Base (use this value for the first menu option):
replace_int = 79C298, 1, 1
# Double to get each successive menu option:
replace_bytes = 79C366, 01 35, 6D 00
# Replacement: Maxmium (stop adding options when this value is exceeded):
replace_int = 79C368, 6, 128
</Patch>


#
# The following two patches are alternatives, don't enable more than one.
#
# `Custom page refresh options (1,8,32,Chapter -- Aura only)`
# `Custom page refresh options (1,32,99,Chapter -- Aura only)`
#
# These two patches only affect the Aura. See above for other devices.
#

<Patch>
patch_name = `Custom page refresh options (1,8,32,Chapter -- Aura only)`
patch_enable = `no`
# patch_group = `Aura page refresh alternatives`
#
## Allows the page refresh to be set to 1, 8, or 32 pages instead of
## 1, 5, or 10 pages. This patch only affects the Aura.
#
# 1,5,10,Chapter
# --> 1,8,32,Chapter
#
replace_int = 79C4BC, 4, 7
replace_int = 79C4CE, 5, 8
replace_int = 79C6A0, 4, 7
replace_int = 79C6B8, 5, 8
replace_int = 79C726, 5, 8
replace_string = BC9890, `5 pages`, `8 pages`
#
replace_int = 79C558, 9, 31
replace_int = 79C56A, 10, 32
replace_int = 79C83E, 9, 31
replace_int = 79C856, 10, 32
replace_int = 79C8B2, 10, 32
replace_string = BC9898, `10 pages`, `32 pages`
</Patch>


<Patch>
patch_name = `Custom page refresh options (1,32,99,Chapter -- Aura only)`
patch_enable = `no`
# patch_group = `Aura page refresh alternatives`
#
## Allows the page refresh to be set to 1, 32, or 99 pages instead of
## 1, 5, or 10 pages. This patch only affects the Aura.
#
# 1,5,10,Chapter
# --> 1,32,99,Chapter
#
replace_int = 79C4BC, 4, 31
replace_int = 79C4CE, 5, 32
replace_int = 79C6A0, 4, 31
replace_int = 79C6B8, 5, 32
replace_int = 79C726, 5, 32
replace_string = BC9890, `5 pages`, `32 page`
#
replace_int = 79C558, 9, 98
replace_int = 79C56A, 10, 99
replace_int = 79C83E, 9, 98
replace_int = 79C856, 10, 99
replace_int = 79C8B2, 10, 99
replace_string = BC9898, `10 pages`, `99 page`
</Patch>


<Patch>
patch_name = `Remove system fonts in Reader list`
patch_enable = `no`
#
## Removes Amasis, Avenir, Caecilia, Georgia, Gill Sans, Kobo Nickel, Malabar.
## BEWARE: Also removes sideloaded Delima, Felbridge, Rockwell, Times New Roman.
#
replace_bytes = 8CA05C, 3C F7 7E E4, 00 46 00 46
</Patch>


<Patch>
patch_name = `Remove non-system fonts in Reader list`
patch_enable = `no`
#
## Removes Kobo Tsukushi Mincho, Kobo UD Kakugo, OpenDyslexic.
## BEWARE: Also removes other sideloaded fonts.
#
replace_bytes = 8CA08A, 3C F7 68 E4, 00 46 00 46
</Patch>


#
# The following four patches are alternatives, don't enable more than one.
#
# `Cyrillic keyboard`
# `Arabic keyboard`
# `Hebrew keyboard`
# `Turkish keyboard`
#

<Patch>
patch_name = `Cyrillic keyboard`
patch_enable = `no`
# patch_group = `Keyboard alternatives`
#
## Replaces keys on the Extended Latin keypad with Cyrillic alternatives.
#
# Enable uppercase for `ß` key
replace_bytes = 851C38, 00 24, 01 24
# Replace layout sign
find_base_address = `ÉÀÇ`
replace_string = 0000, `ÉÀÇ`, `абв`
# Change keyboard layout
find_base_address = `æ\0\0à\0\0è\0\0ì\0\0`
# Second row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, first column.)
replace_string = 0000, `æ\0`, `й`
replace_string = 0004, `à\0`, `ц`
replace_string = 0008, `è\0`, `у`
replace_string = 000C, `ì\0`, `к`
replace_string = 0010, `ò\0`, `е`
replace_string = 0014, `ù\0`, `н`
replace_string = 0018, `á\0`, `г`
replace_string = 001C, `é\0`, `ш`
replace_string = 0020, `í\0`, `щ`
replace_string = 0024, `ó\0`, `з`
replace_string = 0028, `ú\0`, `х`
replace_string = 002C, `ý\0`, `ъ`
# Third row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, second column.)
replace_string = 0030, `œ\0`, `ф`
replace_string = 0034, `â\0`, `ы`
replace_string = 0038, `ê\0`, `в`
replace_string = 003C, `î\0`, `а`
replace_string = 0040, `ô\0`, `п`
replace_string = 0044, `û\0`, `р`
replace_string = 0048, `ä\0`, `о`
replace_string = 004C, `ë\0`, `л`
replace_string = 0050, `ï\0`, `д`
replace_string = 0054, `ö\0`, `ж`
replace_string = 0058, `ü\0`, `э`
replace_string = 005C, `ÿ\0`, `ё`
# Bottom row, left to right:
replace_string = 0060, `ã\0`, `я`
replace_string = 0064, `ñ\0`, `ч`
replace_string = 0068, `õ\0`, `с`
replace_string = 006C, `å\0`, `м`
replace_string = 0070, `ß\0`, `и`
replace_string = 0074, `ç\0`, `т`
replace_string = 0078, `đ\0`, `ь`
replace_string = 007C, `ø\0`, `б`
replace_string = 0080, `ij\0`, `ю`
replace_string = 0084, `ł\0`, `.`
#
# Top row: Extra keys for Touch/Mini/Glo/Aura only.
# (This patch cannot change the top row of the AuraHD/H2O/GloHD keypad.)
find_base_address = `ƒ\0\0þ\0\0š\0\0ž\0\0`
# Top row: columns 1-2 (see first key of second/third rows above.)
# Top row: columns 3-5
replace_string = 0004, `þ\0`, `!`
replace_string = 0008, `š\0`, `"`
replace_string = 000C, `ž\0`, `?`
# Top row: column 6 is a duplicate of the last key on the bottom row.
# Top row: columns 7-10
replace_string = 0000, `ƒ\0`, `,`
replace_string = 0010, `μ\0`, `(`
replace_string = 0014, `ª\0`, `)`
replace_string = 0018, `º\0`, `-`
</Patch>


<Patch>
patch_name = `Arabic keyboard`
patch_enable = `no`
# Multi-version patch: 3.8.0 - 3.19.5761+
# patch_group = `Keyboard alternatives`
#
## Replaces keys on the Extended Latin keypad with Arabic alternatives.
## Note that after the device boots, the keypad will just show blank squares
## until the first book has been opened.
#
# Replace layout sign
find_base_address = `ÉÀÇ`
replace_string = 0000, `ÉÀÇ`, `ع`
# Change keyboard layout
find_base_address = `æ\0\0à\0\0è\0\0ì\0\0`
# Second row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, first column.)
replace_string = 0000, `æ\0`, `ذ`
replace_string = 0004, `à\0`, `ص`
replace_string = 0008, `è\0`, `ث`
replace_string = 000C, `ì\0`, `ق`
replace_string = 0010, `ò\0`, `ف`
replace_string = 0014, `ù\0`, `غ`
replace_string = 0018, `á\0`, `ع`
replace_string = 001C, `é\0`, `ه`
replace_string = 0020, `í\0`, `خ`
replace_string = 0024, `ó\0`, `ح`
replace_string = 0028, `ú\0`, `ج`
replace_string = 002C, `ý\0`, `د`
# Third row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, second column.)
replace_string = 0030, `œ\0`, `ض`
replace_string = 0034, `â\0`, `ش`
replace_string = 0038, `ê\0`, `س`
replace_string = 003C, `î\0`, `ي`
replace_string = 0040, `ô\0`, `ب`
replace_string = 0044, `û\0`, `ل`
replace_string = 0048, `ä\0`, `ا`
replace_string = 004C, `ë\0`, `ت`
replace_string = 0050, `ï\0`, `ن`
replace_string = 0054, `ö\0`, `م`
replace_string = 0058, `ü\0`, `ك`
replace_string = 005C, `ÿ\0`, `ط`
# Bottom row, left to right:
replace_string = 0060, `ã\0`, `ئ`
replace_string = 0064, `ñ\0`, `ء`
replace_string = 0068, `õ\0`, `ؤ`
replace_string = 006C, `å\0`, `ر`
replace_string = 0070, `ß\0`, `ى`
replace_string = 0074, `ç\0`, `ة`
replace_string = 0078, `đ\0`, `و`
replace_string = 007C, `ø\0`, `ز`
replace_string = 0080, `ij\0`, `ظ`
replace_string = 0084, `ł\0`, `.`
#
# Top row: Extra keys for Touch/Mini/Glo/Aura only.
# (This patch cannot change the top row of the AuraHD/H2O/GloHD keypad.)
find_base_address = `ƒ\0\0þ\0\0š\0\0ž\0\0`
# Top row: columns 1-2 (see first key of second/third rows above.)
# Top row: columns 3-5
replace_string = 0004, `þ\0`, `أ`
replace_string = 0008, `š\0`, `إ`
replace_string = 000C, `ž\0`, `آ`
# Top row: column 6 is a duplicate of the last key on the bottom row.
# Top row: columns 7-10
replace_string = 0000, `ƒ\0`, `,`
replace_string = 0010, `μ\0`, `(`
replace_string = 0014, `ª\0`, `)`
replace_string = 0018, `º\0`, `-`
</Patch>


<Patch>
patch_name = `Hebrew keyboard`
patch_enable = `no`
# Multi-version patch: 3.8.0 - 3.19.5761+
# patch_group = `Keyboard alternatives`
#
## Replaces keys on the Extended Latin keypad with Hebrew alternatives.
## Note that after the device boots, the keypad will just show blank squares
## until the first book has been opened.
#
# Replace layout sign
find_base_address = `ÉÀÇ`
replace_string = 0000, `ÉÀÇ`, `אב`
# Change keyboard layout
find_base_address = `æ\0\0à\0\0è\0\0ì\0\0`
# Second row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, first column.)
replace_string = 0000, `æ\0`, `@`
replace_string = 0004, `à\0`, `'`
replace_string = 0008, `è\0`, `/`
replace_string = 000C, `ì\0`, `ק`
replace_string = 0010, `ò\0`, `ר`
replace_string = 0014, `ù\0`, `א`
replace_string = 0018, `á\0`, `ט`
replace_string = 001C, `é\0`, `ו`
replace_string = 0020, `í\0`, `ן`
replace_string = 0024, `ó\0`, `ם`
replace_string = 0028, `ú\0`, `פ`
replace_string = 002C, `ý\0`, `-`
# Third row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, second column.)
replace_string = 0030, `œ\0`, `,`
replace_string = 0034, `â\0`, `ש`
replace_string = 0038, `ê\0`, `ד`
replace_string = 003C, `î\0`, `ג`
replace_string = 0040, `ô\0`, `כ`
replace_string = 0044, `û\0`, `ע`
replace_string = 0048, `ä\0`, `י`
replace_string = 004C, `ë\0`, `ח`
replace_string = 0050, `ï\0`, `ל`
replace_string = 0054, `ö\0`, `ך`
replace_string = 0058, `ü\0`, `ף`
replace_string = 005C, `ÿ\0`, `_`
# Bottom row, left to right:
replace_string = 0060, `ã\0`, `ז`
replace_string = 0064, `ñ\0`, `ס`
replace_string = 0068, `õ\0`, `ב`
replace_string = 006C, `å\0`, `ה`
replace_string = 0070, `ß\0`, `נ`
replace_string = 0074, `ç\0`, `מ`
replace_string = 0078, `đ\0`, `צ`
replace_string = 007C, `ø\0`, `ת`
replace_string = 0080, `ij\0`, `ץ`
replace_string = 0084, `ł\0`, `.`
#
# Top row: Extra keys for Touch/Mini/Glo/Aura only.
# (This patch cannot change the top row of the AuraHD/H2O/GloHD keypad.)
find_base_address = `ƒ\0\0þ\0\0š\0\0ž\0\0`
# Top row: columns 1-2 (see first key of second/third rows above.)
# Top row: columns 3-5
replace_string = 0004, `þ\0`, `!`
replace_string = 0008, `š\0`, `"`
replace_string = 000C, `ž\0`, `?`
# Top row: column 6 is a duplicate of the last key on the bottom row.
# Top row: columns 7-10
replace_string = 0000, `ƒ\0`, `:`
replace_string = 0010, `μ\0`, `)`
replace_string = 0014, `ª\0`, `(`
replace_string = 0018, `º\0`, `;`
</Patch>


<Patch>
patch_name = `Turkish keyboard`
patch_enable = `no`
# patch_group = `Keyboard alternatives`
#
## Replaces keys on the Extended Latin keypad with Turkish alternatives.
#
# Enable uppercase for `ß` key
replace_bytes = 851C38, 00 24, 01 24
# Replace layout sign
find_base_address = `ÉÀÇ`
replace_string = 0000, `ÉÀÇ`, `EN/TR`
# Change keyboard layout
find_base_address = `æ\0\0à\0\0è\0\0ì\0\0`
# Second row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, first column.)
replace_string = 0000, `æ\0`, `!`
replace_string = 0004, `à\0`, `q`
replace_string = 0008, `è\0`, `w`
replace_string = 000C, `ì\0`, `e`
replace_string = 0010, `ò\0`, `r`
replace_string = 0014, `ù\0`, `t`
replace_string = 0018, `á\0`, `y`
replace_string = 001C, `é\0`, `u`
replace_string = 0020, `í\0`, `ı`
replace_string = 0024, `ó\0`, `o`
replace_string = 0028, `ú\0`, `p`
replace_string = 002C, `ý\0`, `ü`
# Third row, left to right:
# (for Touch/Mini/Glo/Aura the first key moves to top row, second column.)
replace_string = 0030, `œ\0`, `’`
replace_string = 0034, `â\0`, `a`
replace_string = 0038, `ê\0`, `s`
replace_string = 003C, `î\0`, `d`
replace_string = 0040, `ô\0`, `f`
replace_string = 0044, `û\0`, `g`
replace_string = 0048, `ä\0`, `h`
replace_string = 004C, `ë\0`, `j`
replace_string = 0050, `ï\0`, `k`
replace_string = 0054, `ö\0`, `l`
replace_string = 0058, `ü\0`, `ş`
replace_string = 005C, `ÿ\0`, `ğ`
# Bottom row, left to right:
replace_string = 0060, `ã\0`, `z`
replace_string = 0064, `ñ\0`, `x`
replace_string = 0068, `õ\0`, `c`
replace_string = 006C, `å\0`, `v`
replace_string = 0070, `ß\0`, `b`
replace_string = 0074, `ç\0`, `n`
replace_string = 0078, `đ\0`, `m`
replace_string = 007C, `ø\0`, `ö`
replace_string = 0080, `ij\0`, `ç`
replace_string = 0084, `ł\0`, `i`
#
# Top row: Extra keys for Touch/Mini/Glo/Aura only.
# (This patch cannot change the top row of the AuraHD/H2O/GloHD keypad.)
find_base_address = `ƒ\0\0þ\0\0š\0\0ž\0\0`
# Top row: columns 1-2 (see first key of second/third rows above.)
# Top row: columns 3-5
replace_string = 0004, `þ\0`, `?`
replace_string = 0008, `š\0`, `”`
replace_string = 000C, `ž\0`, `-`
# Top row: column 6 is a duplicate of the last key on the bottom row.
# Top row: columns 7-10
replace_string = 0000, `ƒ\0`, `:`
replace_string = 0010, `μ\0`, `;`
replace_string = 0014, `ª\0`, `,`
replace_string = 0018, `º\0`, `.`
</Patch>


<Patch>
patch_name = `Customise PinchGestureRecognizer`
patch_enable = `no`
# PinchGestureRecognizer::StationaryTolerance
replace_float = BB0F40, 5.0, 5.0
# PinchGestureRecognizer::UpdateTolerance
replace_float = BB0F48, 10.0, 10.0
# PinchGestureRecognizer::TriggerTolerance
replace_float = BB0F50, 30.0, 30.0
</Patch>


<Patch>
patch_name = `Margins fine tuning`
patch_enable = `no`
#
## Do not enable this patch unless you're sure you need it.
## It may cause the screen to be off-centre.
#
# Initial replaces
replace_bytes = 91BC04, 19 46, 00 21
replace_bytes = 91BC08, 1A 46, 00 22
# Values for replace
# Left margin
replace_int = 91BC04, 0, 10
# Top margin
replace_int = 91BC08, 0, 10
</Patch>


<Patch>
patch_name = `Custom kepub default margins`
patch_enable = `no`
#
## Sets the built-in minimum margin for KePub books and Pocket articles to
## zero, the same as it is in ePub books. This only affects left/right margins
## in normal reading mode, but all four margins in full-screen mode.
#
# Device = Glo/Aura, Type = pocket article or non-Japanese kepub
replace_int = 5BC58A, 25, 0
# Device = Glo/Aura, Type = Japanese kepub
replace_int = 5BC58C, 45, 0
# Device = Other, Type = Any
replace_int = 5BC59C, 20, 0
</Patch>


<Patch>
patch_name = `Block WiFi firmware upgrade`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## WARNING: THIS IS A DANGEROUS PATCH! READ THE INFORMATION BELOW CAREFULLY!
##
## THIS PATCH IS UNTESTED, as there is no way to be sure it still works until
## the next firmware version is released. If it works then the firmware will
## not be upgraded during a WiFi sync, but you will still be able to upgrade
## manually or by syncing with the Kobo desktop.
##
## THIS PATCH COULD RESULT IN A BOOT LOOP when signing out of your Kobo account
## (Settings > Accounts > Sign out) or when invoking a factory reset from the
## device information menu (Settings > Device information > Factory reset).
## REMOVE THIS PATCH BEFORE USING EITHER OF THOSE OPTIONS.
## A factory reset invoked using the hardware methods (such as holding down the
## light button while switching on) should not be affected.
#
find_base_address = `U\0p\0g\0r\0a\0d\0e\0C\0h\0e\0c\0k\0/\0%\01\0/\0%\02\0/\0%\03\0/\0%\04\0/\0%\05\0`
replace_string = 0026, `%\03\0/\0%\04\0/\0%\05\0`, `k\0/\09\09\0.\09\0/\05\0`
</Patch>


<Patch>
patch_name = `Custom footer (page number text)`
patch_enable = `no`
# Multi-version patch: 2.8.1 - 3.19.5761+
#
## Shortens the page number text in the reading footer, and perhaps elsewhere.
## E.g. "Page 1 of 2" becomes "1 / 2" (not sure how it affects translations)
#
find_base_address = `Page %1 <i>of</i> %2`
replace_string = 0000, `Page %1 <i>of</i> %2`, `%1 / %2`
</Patch>


<Patch>
patch_name = `Custom Sleep/Power-off timeouts`
patch_enable = `no`
#
## Changes the Sleep/Power-off timeout menu options from 5,10,15,30,45,60
## minutes to 10,20,30,60,120,240 minutes.
#
# Values displayed on both menus
replace_string = C3A334, `5 mins\0`, `10 mins`
replace_string = C3A33C, `10 mins`, `20 mins`
replace_string = C3A344, `15 mins`, `30 mins`
replace_string = C3A34C, `30 mins`, `1 hour`
replace_string = C3A354, `45 mins`, `2 hours`
replace_string = C3A35C, `60 mins`, `4 hours`
# Actual values used for sleep menu
replace_int = 9928CE, 5, 10
replace_int = 992918, 10, 20
replace_int = 99295C, 15, 30
replace_int = 9929A0, 30, 60
replace_int = 9929E4, 45, 120
replace_int = 992A28, 60, 240
# Actual values used for power menu
replace_int = 992ADC, 5, 10
replace_int = 992B20, 10, 20
replace_int = 992B62, 15, 30
replace_int = 992BA2, 30, 60
replace_int = 992BE2, 45, 120
replace_int = 992C20, 60, 240
</Patch>


<Patch>
patch_name = `Set kepub hyphenation`
patch_enable = `no`
#
## The built-in kepub stylesheet has a line "* { -webkit-hyphens: 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 = 91F34A, FB F6 9A E4, 01 20 01 20
#
# Alternative 2: Never turn kepub hyphenation on
#replace_bytes = 91F34A, FB F6 9A E4, 00 20 00 20
</Patch>


<Patch>
patch_name = `Fix three KePub fullScreenReading bugs`
patch_enable = `yes`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## (See https://www.mobileread.com/forums/sho...0&postcount=16
## for screenshots and more information about the problems this patch fixes.)
##
## In full-screen reading mode (when the FullScreenReading feature setting is
## activated and the "Show header and footer" reading setting is unticked) the
## KePub reader has three problems:
##
## 1. If the book's stylesheet has non-zero body margin/padding, then the
## text is shifted to the right and can be cut off at the right margin.
## 2. Characters with large side bearing values (such as italic f, J) can
## be cut off if they appear at either end of a line.
## 3. Images which are supposed to be displayed inline (flowing with the text)
## are instead displayed centred in a seperate block.
##
## This patch fixes those problems by replacing the following faulty style,
## which is the cause of problem 3.:
##
## img {
## display: block;
## margin-left: auto !important;
## margin-right: auto !important;
## width: auto !important;
## height: auto !important;
## }
##
## with the following two styles, which work around problems 1. and 2.:
##
## body {
## margin: 0 !important;
## padding: 0 !important;
## }
##
## body>div {
## padding-left: 0.2em !important;
## padding-right: 0.2em !important;
## }
#
find_base_address = `\0i\0m\0g\0 \0{\0 \0d\0i\0s\0p\0l\0a\0y\0:\0 \0b\0l\0o\0c\0k\0;\0`
replace_string = 0001, `i\0m\0g\0 \0{\0 \0d\0i\0s\0p\0l\0a\0y\0:\0 \0b\0l\0o\0c\0k\0;\0 \0m\0a\0r\0g\0i\0n\0-\0l\0e\0f\0t\0:\0 \0a\0u\0t\0o\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0m\0a\0r\0g\0i\0n\0-\0r\0i\0g\0h\0t\0:\0 \0a\0u\0t\0o\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0w\0i\0d\0t\0h\0:\0 \0a\0u\0t\0o\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0h\0e\0i\0g\0h\0t\0:\0 \0a\0u\0t\0o\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0`, `b\0o\0d\0y\0 \0{\0 \0m\0a\0r\0g\0i\0n\0:\0 \00\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0p\0a\0d\0d\0i\0n\0g\0:\0 \00\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0 \0 \0b\0o\0d\0y\0>\0d\0i\0v\0 \0{\0 \0p\0a\0d\0d\0i\0n\0g\0-\0l\0e\0f\0t\0:\0 \00\0.\02\0e\0m\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0p\0a\0d\0d\0i\0n\0g\0-\0r\0i\0g\0h\0t\0:\0 \0 \00\0.\02\0e\0m\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0`
#
#
# Optional replacement values below (all relate to the second problem above):
#
# Uncomment to set the amount of added padding: `1` = 0.1em, `2` = 0.2em, etc.
# 0.1em is enough for many fonts, but some (such as Georgia) need 0.2em.
#
replace_string = 00A5, `2`, `2`
replace_string = 00E9, `2`, `2`
#
# The default patch settings are suitable for horizontal languages only.
# Uncomment the following two replace_string lines for vertical languages only:
#
#replace_string = 0095, `l\0e\0f\0t\0:\0`, `t\0o\0p\0:\0 \0`
#replace_string = 00D5, `r\0i\0g\0h\0t\0:\0 \0`, `b\0o\0t\0t\0o\0m\0:\0`
#
# ... or the following two replace_string lines for both horizontal and vertical
# languages: (But note that this will cause the padding to be added at the
# beginning/end of each chapter too.)
#
#replace_string = 0093, `-\0l\0e\0f\0t\0:\0`, `:\0 \0 \0 \0 \0 \0`
#replace_string = 00AD, `!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0p\0a\0d\0d\0i\0n\0g\0-\0r\0i\0g\0h\0t\0:\0`, `\x20\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0`
#
# Sideloaded KePubs created with old versions of the KoboTouchExtended driver,
# and perhaps some other KePubs that haven't been through Kobo's EPUB2 to KEPUB
# conversion process, might not have a wrapper div to apply the padding styles
# to. Uncomment the following line to work around the second problem for these
# KePubs too. (But beware, this can have unwanted side effects such as extra
# space between paragraphs if the above option for both horizontal and vertical
# languages is uncommented too.)
#
#replace_string = 0079, `d\0i\0v\0`, `*\0 \0 \0`
</Patch>


<Patch>
patch_name = `Force user line spacing in KePubs`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## This patch will allow the line spacing set by the slider to take effect
## in some problem KePub books with fixed linespacing (ones where the publisher
## has used <div> instead of <p> for pararaphs.) However it might also override
## some line spacing that would better be left fixed.
#
# body, p { line-height: %1 ... } --> body,div,p{line-height:%1 ... }
find_base_address = `b\0o\0d\0y\0,\0 \0p\0 \0{\0 \0l\0i\0n\0e\0-\0h\0e\0i\0g\0h\0t\0:\0 \0%`
replace_string = 0000, `b\0o\0d\0y\0,\0 \0p\0 \0{\0 \0l\0i\0n\0e\0-\0h\0e\0i\0g\0h\0t\0:\0 \0%`, `b\0o\0d\0y\0,\0d\0i\0v\0,\0p\0{\0l\0i\0n\0e\0-\0h\0e\0i\0g\0h\0t\0:\0%`
</Patch>


<Patch>
patch_name = `Force user line spacing in ePubs (part 1 of 2)`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## This is part 1 of 2. Also enable part 2 in librmsdk.so.1.0.0.patch
##
## This patch prevents any line-height style set in the book's stylesheet from
## being recognised. It will spoil the formatting of some books, but will
## ensure that the line spacing set with the adjustment slider takes effect.
#
find_base_address = `\0\0\x20\0l\0i\0n\0e\0-\0h\0e\0i\0g\0h\0t\0`
replace_string = 0004, `l`, `_`
</Patch>


<Patch>
patch_name = `ePub fixed font sharpness`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## This patch causes a fixed value for font sharpness to be used in epub books,
## instead of the value set by the advanced font sharpness/weight slider. The
## slider sharpness values range from -0.4(min.) to 0.2(max.), default -0.0666.
## This patch allows one of three fixed values: 0.0, 0.1, or 0.2.
#
# -kobo-font-sharpness: %1; --> -kobo-font-sharpness:0.0;
#
find_base_address = `\x10\0\0\0 \0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0s\0h\0`
replace_string = 0030, `\x20\0%\01\0`, `0\0.\00\0`
#
# Replacement sharpness value: `0` = 0.0, `1` = 0.1, `2` = 0.2.
replace_string = 0034, `0`, `2`
</Patch>


<Patch>
patch_name = `KePub fixed font sharpness`
patch_enable = `no`
# Multi-version patch: 3.11.0 - 3.19.5761+
#
## This patch causes a fixed value for font sharpness to be used in kepub books,
## instead of the value set by the advanced font sharpness/weight slider. The
## slider sharpness values range from -0.4(min.) to 0.2(max.), default -0.0666.
## This patch allows one of three fixed values: 0.0, 0.1, or 0.2.
#
# body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; }\n
# --> body{-kobo-font-sharpness:0.0/*%1*/;-kobo-font-thickness:%2}\n
#
find_base_address = `b\0o\0d\0y\0 \0{\0 \0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0s\0h\0`
replace_string = 0000, `b\0o\0d\0y\0 \0{\0 \0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0s\0h\0a\0r\0p\0n\0e\0s\0s\0:\0 \0%\01\0;\0 \0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0t\0h\0i\0c\0k\0n\0e\0s\0s\0:\0 \0%\02\0;\0 \0}\0\n\0`, `b\0o\0d\0y\0{\0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0s\0h\0a\0r\0p\0n\0e\0s\0s\0:\00\0.\00\0/\0*\0%\01\0*\0/\0;\0-\0k\0o\0b\0o\0-\0f\0o\0n\0t\0-\0t\0h\0i\0c\0k\0n\0e\0s\0s\0:\0%\02\0}\0\n\0`
#
# Replacement sharpness value: `0` = 0.0, `1` = 0.1, `2` = 0.2.
#
replace_string = 0038, `0`, `2`
</Patch>


<Patch>
patch_name = `Un-force font-family override p tags (std epubs)`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## This patch allows the font set for paragraphs by the publisher in the epub
## stylesheet to override the font selected by the reader from the device.
#
# body, p { font-family: -ua-default !important; }
# --> body { font-family: -ua-default !important; }
#
find_base_address = `b\0o\0d\0y\0,\0 \0p\0 \0{\0 \0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0`
replace_string = 0000, `b\0o\0d\0y\0,\0 \0p\0`,`b\0o\0d\0y\0 \0 \0 \0`
</Patch>


<Patch>
patch_name = `Un-Force user text-align in div,p tags in KePubs`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## This patch allows the text alignment set by the publisher in the kepub
## stylesheet to override the alignment selected by the reader from the device.
#
# div, p { text-align: %1 !important; }
# --> body { text-align: %1 !important; }
#
find_base_address = `d\0i\0v\0,\0 \0p\0 \0{\0 \0t\0e\0x\0t\0-\0a\0l\0i\0g\0n\0:\0 \0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}`
replace_string = 0000, `d\0i\0v\0,\0 \0p`, `b\0o\0d\0y\0 \0 `
</Patch>


<Patch>
patch_name = `Always display chapter name on navigation menu`
patch_enable = `no`
#
## Normally the <-> navigation menu only displays the current chapter name if
## [Reading settings > Display progress for:] is set to 'Current Chapter'.
## This patch causes the current chapter name to be displayed if 'Entire book'
## progress is selected as well. Works for both ePub and KePub books.
#
# in ReadingMenuScrubberController::setChapterAndProgre ssText(...)
# progressTypeIsBookBased(...) --> False
replace_bytes = 8DA5C0, 3A F7 30 E5, 00 20 00 20
</Patch>


<Patch>
patch_name = `Change dicthtml strings to micthtml`
patch_enable = `no`
#
## This patch is used for something to do with syncing and custom dictionaries.
## If you don't know what it does, then you probably don't need it.
#
# `%1/dicthtml%2.zip` --> `%1/micthtml%2.zip`
#replace_string = B671B4, `%1/dicthtml%2.zip`, `%1/micthtml%2.zip`
# `%1/dicthtml%2` --> `%1/micthtml%2`
replace_string = B8B47C, `%\01\0/\0d\0i\0c\0t\0h\0t\0m\0l\0%\02\0`, `%\01\0/\0m\0i\0c\0t\0h\0t\0m\0l\0%\02\0`
# `dicthtml` --> `micthtml`
replace_string = B8B4C4, `d\0i\0c\0t\0h\0t\0m\0l\0`, `m\0i\0c\0t\0h\0t\0m\0l\0`
# `%1/dicthtml%2` --> `%1/micthtml%2`
replace_string = B8B564, `%\01\0/\0d\0i\0c\0t\0h\0t\0m\0l\0%\02\0`, `%\01\0/\0m\0i\0c\0t\0h\0t\0m\0l\0%\02\0`
# `%1/dicthtml%2` --> `%1/micthtml%2`
replace_string = B8B5C8, `%\01\0/\0d\0i\0c\0t\0h\0t\0m\0l\0%\02\0`, `%\01\0/\0m\0i\0c\0t\0h\0t\0m\0l\0%\02\0`
# `%1/dicthtml%2` --> `%1/micthtml%2`
replace_string = B8B62C, `%\01\0/\0d\0i\0c\0t\0h\0t\0m\0l\0%\02\0`, `%\01\0/\0m\0i\0c\0t\0h\0t\0m\0l\0%\02\0`
# `%1/%2/dict/dicthtml%3` --> `%1/%2/dict/micthtml%3`
replace_string = B8B690, `%\01\0/\0%\02\0/\0d\0i\0c\0t\0/\0d\0i\0c\0t\0h\0t\0m\0l\0%\03\0`, `%\01\0/\0%\02\0/\0d\0i\0c\0t\0/\0m\0i\0c\0t\0h\0t\0m\0l\0%\03\0`
# `dicthtml*` --> `micthtml*`
#replace_string = B8BE0C, `d\0i\0c\0t\0h\0t\0m\0l\0*\0`, `m\0i\0c\0t\0h\0t\0m\0l\0*\0`
# `dicthtml*` --> `micthtml*`
#replace_string = B920F4, `d\0i\0c\0t\0h\0t\0m\0l\0*\0`, `m\0i\0c\0t\0h\0t\0m\0l\0*\0`
# `dicthtml%1` --> `micthtml%1`
#replace_string = B9451C, `d\0i\0c\0t\0h\0t\0m\0l\0%\01\0`, `m\0i\0c\0t\0h\0t\0m\0l\0%\01\0`
</Patch>


<Patch>
patch_name = `Un-Force user font-family in KePubs`
patch_enable = `no`
# Multi-version patch: 3.3.0 - 3.19.5761+
#
## The KePub reader uses a very heavy-handed method of setting the font selected
## by the user, overriding all fonts set by the publisher in the book unless
## "Publisher Default" is selected.
##
## This patch lets the font-family set by the publisher in the KePub stylesheet
## to override the font-family selected by the reader from the device in some
## cases, which allows a mix of user-selected and publisher-selected fonts.
## Alternatives 1-3 give increasing preference to the publisher-selected fonts.
#
find_base_address = `*\0 \0{\0 \0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0\n\0`
#
# Alternatve 1:
#
# * { font-family: %1 !important; }\n
# --> div,p{font-family:%1!important; }\n
#
replace_string = 0000, `*\0 \0{\0 \0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0\n\0`, `d\0i\0v\0,\0p\0{\0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0%\01\0!\0i\0m\0p\0o\0r\0t\0 a\0n\0t\0;\0 \0}\0\n\0`
#
# Alternatve 2: (Similar to ePub default)
#
# * { font-family: %1 !important; }\n
# --> body,p{font-family:%1!important;}\n
#
#replace_string = 0000, `*\0 \0{\0 \0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0\n\0`, `b\0o\0d\0y\0,\0p\0{\0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0%\01\0!\0i\0m\0p\0o\0r\0t\0 a\0n\0t\0;\0}\0\n\0`
#
# Alternative 3: (similar to ePub with `Un-force font-family override p tags`)
#
# * { font-family: %1 !important; }\n
# --> body{font-family:%1 !important; }\n
#
#replace_string = 0000, `*\0 \0{\0 \0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0\n\0`, `b\0o\0d\0y\0{\0f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0%\01\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0\n\0`
</Patch>


<Patch>
patch_name = `KePub full justification default`
patch_enable = `no`
# Multi-version patch: 3.16.0 - 3.19.5761+
#
## This patch makes full justification the default for KePub books by adding the
## following to the built-in KePub stylesheet:
##
## body{text-align:justify}
##
## This only sets the default, if the publisher has set the justification in the
## book's stylesheet then it will override the default, and so you might still
## need to use the justify button on the Aa menu to set full justification.
##
## The advantage of this patch is that using the justify button (which also
## forces some things such as headings to be fully justified instead of
## centred), can be avoided for some books.
#
find_base_address = `.\0K\0B\0H\0i\0g\0h\0l\0i\0g\0h\0t\0i\0n\0g\0,\0 \0.\0K\0B\0S\0e\0a\0r\0c\0h\0R\0e\0s\0u\0l\0t\0 \0{\0 \0b\0a\0c\0k\0g\0r\0o\0u\0n\0d\0-\0c\0o\0l\0o\0r\0:\0 \0#\0C\06\0C\06\0C\06\0`
#
replace_string = 0000, `.\0K\0B\0H\0i\0g\0h\0l\0i\0g\0h\0t\0i\0n\0g\0,\0 \0.\0K\0B\0S\0e\0a\0r\0c\0h\0R\0e\0s\0u\0l\0t\0 \0{\0 \0b\0a\0c\0k\0g\0r\0o\0u\0n\0d\0-\0c\0o\0l\0o\0r\0:\0 \0#\0C\06\0C\06\0C\06\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0 \0\t\0`, `.\0K\0B\0H\0i\0g\0h\0l\0i\0g\0h\0t\0i\0n\0g\0,\0. \0K\0B\0S\0e\0a\0r\0c\0h\0R\0e\0s\0u\0l\0t\0{\0b\0 a\0c\0k\0g\0r\0o\0u\0n\0d\0-\0c\0o\0l\0o\0r\0:\0#\0C\06\0C\06\0C\06\0!\0i\0m\0 p\0o\0r\0t\0a\0n\0t\0}\0.\0K\0B\0S\0t\0a\0c\0k\0K\ 0`
#
replace_string = 0098, `.\0K\0B\0S\0t\0a\0c\0k\0K\0e\0y\0w\0o\0r\0d\0,\0 \0.\0K\0B\0S\0e\0a\0r\0c\0h\0R\0e\0s\0u\0l\0t\0,\0 \0.\0K\0B\0A\0n\0n\0o\0t\0a\0t\0i\0o\0n\0,\0 \0.\0K\0B\0H\0i\0g\0h\0l\0i\0g\0h\0t\0i\0n\0g\0 \0,\0 \0K\0B\0A\0u\0t\0h\0o\0r\0A\0n\0n\0o\0t\0a\0t\0i\0 o\0n\0{\0 \0f\0o\0n\0t\0-\0s\0i\0z\0e\0:\0 \01\00\00\0%\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0-\0w\0e\0b\0k\0i\0t\0-\0t\0e\0x\0t\0-\0c\0o\0m\0b\0i\0n\0e\0:\0 \0i\0n\0h\0e\0r\0i\0t\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0 \0\t\0`, `e\0y\0w\0o\0r\0d\0,\0.\0K\0B\0S\0e\0a\0r\0c\0h\0R \0e\0s\0u\0l\0t\0,\0.\0K\0B\0A\0n\0n\0o\0t\0a\0t\0 i\0o\0n\0,\0.\0K\0B\0H\0i\0g\0h\0l\0i\0g\0h\0t\0i\ 0n\0g\0,\0 \0K\0B\0A\0u\0t\0h\0o\0r\0A\0n\0n\0o\0t\0a\0t\0i\0 o\0n\0{\0f\0o\0n\0t\0-\0s\0i\0z\0e\0:\01\00\00\0%\0!\0i\0m\0p\0o\0r\0t\0 a\0n\0t\0;\0-\0w\0e\0b\0k\0i\0t\0-\0t\0e\0x\0t\0-\0c\0o\0m\0b\0i\0n\0e\0:\0i\0n\0h\0e\0r\0i\0t\0!\0 i\0m\0p\0o\0r\0t\0a\0n\0t\0}\0.\0K\0B\0S\0t\0a\0c\ 0k\0K\0e\0y\0w\0o\0r\0d\0 \0a\0{\0c\0o\0l\0o\0r\0`
#
replace_string = 1D8, `.\0K\0B\0S\0t\0a\0c\0k\0K\0e\0y\0w\0o\0r\0d\0 \0a\0 \0{\0 \0c\0o\0l\0o\0r\0:\0 \0b\0l\0a\0c\0k\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0 \0}\0 \0\t\0`, `:\0b\0l\0a\0c\0k\0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0} \0b\0o\0d\0y\0{\0t\0e\0x\0t\0-\0a\0l\0i\0g\0n\0:\0j\0u\0s\0t\0i\0f\0y\0}\0 \0 \0 \0 \0 \0 \0 \0`
#
# Fix typo in annotations styles: KBAuthorAnnotation --> .KBAuthorAnnotation
replace_string = 0102, `\x20`, `.`
</Patch>
Josieb1 is offline   Reply With Quote