View Single Post
Old 01-21-2015, 02:07 AM   #138
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by GeoffR View Post
With patch32lsb v0.10 the addresses can be found automatically for some patches, so there might be no need to change anything at all in the patch for it to work with the next firmware version.



I haven't seen anything like that happen, but some strange things can happen if there is a typo in the footer patch and one of the replacement strings is too short.
It is the glo ( having it on both my Glo's ) it only happens when the Glo went empty or after a reset.
This is the section:
Spoiler:

# libnickel.so.1.0.0 in firmware 3.11.0 (4d8eac1207)

#
# The following two patches are alternatives, don't enable both at once.
#

<Patch>
patch_name = `Disable reading footer`
patch_enable = `no`
replace_string = DBDBFC, `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}`, `* {\n\theight: 5px;\n\tfont-size: 1px;\n\tcolor: transparent;\n}\n\n`
</Patch>

<Patch>
patch_name = `Freedom to advanced fonts control`
patch_enable = `yes`
#
# This patch allows the advanced font options (weight/sharpness adjustments)
# to be used with sideloaded fonts too.
#
# WARNING: IT IS NOT SAFE TO ENABLE THIS PATCH IF YOUR DEVICE IS SET TO A
# JAPANESE LOCALE OR IF ANY JAPANESE BOOKS ARE OPENED.
#
# VolumeManager.isJapanese() --> False
replace_bytes = 68F4B4, 95 F5 48 EF, 00 20 00 20
# N3FontTypeUtil.setupMonotypeDropdown(a,b)
# --> N3FontTypeUtil.setupDropdown(UNDEFINED,a,b)
replace_bytes = 7E7FAE, 58 46 51 46, 59 46 52 46
replace_bytes = 7E7FB2, 35 F4 B2 E9, 4B F4 42 EC
# N3FontTypeController.setupAdvancedOption --> NOP
replace_bytes = 94CE12, FA F6 34 E7, 00 46 00 46
replace_bytes = 94EEB8, F8 F6 E0 E6, 00 46 00 46
</Patch>


<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
replace_string = DBDBFC, `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 Nick's Glo:
replace_string = DBDC0D, `min-height: 70px;`, `min-height: 40px;`
replace_string = DBDC20, `max-height: 70px;`, `max-height: 40px;`
replace_string = DBDC3D, `footerMargin: 105;`, `footerMargin: 105;`
replace_string = DBDC58, `font-size: 16px;`, `font-size: 28px;`
replace_string = DBDC6A, `padding-bottom: 0px;`, `padding-bottom: 7px;`
replace_string = DBDC80, `margin-top: 0px;`, `margin-top:10px;`
#
# Example for Nick's Aura HD:
#replace_string = DBDC0D, `min-height: 70px;`, `min-height: 40px;`
#replace_string = DBDC20, `max-height: 70px;`, `max-height: 40px;`
#replace_string = DBDC3D, `footerMargin: 105;`, `footerMargin: 170;`
#replace_string = DBDC58, `font-size: 16px;`, `font-size: 32px;`
#replace_string = DBDC6A, `padding-bottom: 0px;`, `padding-bottom: 9px;`
#replace_string = DBDC80, `margin-top: 0px;`, `margin-top: 7px;`
#
# 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 using the same font.)
#
replace_string = DBDC92, `/*font-family:none;*/`, `font-family: Amasis;`
#replace_string = DBDC92, `/*font-family:none;*/`, `font-family: Avenir;`
#replace_string = DBDC92, `/*font-family:none;*/`, `font-family: Georgia;`
#
</Patch>



Quote:
Originally Posted by jshzh View Post
This is a dumb question. I don't know which software to use for opening and editing the .patch files in Windows. I could open them and make changes with notepad. Is that okay?
I use Notepad ++
The normal notepad doesn't handle line endings okay and when the reader reads files that are handled with the normal Notepad it can crash. (The patch files are not read by the reader so they can be safely done with normal Notepad.)
Safe as Encode in UTF-8 without BOM in options (but as far as I know Notepad++ recognize the file style and does that automatically)

Last edited by Nick_1964; 01-21-2015 at 02:36 AM.
Nick_1964 is offline   Reply With Quote