View Single Post
Old 05-27-2014, 04:19 AM   #122
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 header style

Here is the patch locations of the CSS stylesheet fragment used for the kepub header text if anyone wants to play around with it. Any changes affect the home page header, library header, etc. too.

There seems to be a difference between the Touch and the Glo/Aura/AuraHD, on the Touch the header always uses font-family: Avenir; but on the other models no font-family is set, so whatever is selected fom the font menu is used, or Gothic if Document default is selected.

This example patch forces the Glo/Aura header to use font-family Avenir, the same as the Touch. If you set the footer to match, that would avoid the buggy Gothic/Ryumin fonts from being used at all when Document Default is selected.

firmware 3.3.0:
Spoiler:
Code:
<Patch>
patch_name = `Custom header style`
patch_enable = `yes`
#
# Touch? (not tested). Avenir already set.
#replace_string = D8A658, `* {\nfont-size: 16px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n[qApp_localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}`, `* {\nfont-size: 16px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n[qApp_localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}`
#
# Glo/Aura. No font specified, set to Avenir.
replace_string = D89484, `* {\n\tbackground-color: transparent;\n\tpadding-top:3px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 21px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`, `* {\n\tbackground-color: transparent;\n\tpadding-top: 3px;\n\tfont-size: 20px;\nfont-family: Avenir;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`
#
# AuraHD. No font specified, set to Avenir.
#replace_string = D89484, `* {\n\tbackground-color: transparent;\n\tpadding-top:3px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 21px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`, `* {\n\tbackground-color: transparent;\n\tpadding-top: 3px;\n\tfont-size: 26px;\nfont-family: Avenir;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`
</Patch>


firmware 3.3.1:
Spoiler:
Code:
<Patch>
patch_name = `Custom header style`
patch_enable = `yes`
#
# Touch? (not tested). Avenir already set.
replace_string = D8D978, `* {\nfont-size: 16px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n[qApp_localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}`, `* {\nfont-size: 16px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n[qApp_localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}`
#
# Glo/Aura. No font specified, set to Avenir.
replace_string = D8C7A4, `* {\n\tbackground-color: transparent;\n\tpadding-top:3px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 21px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`, `* {\n\tbackground-color: transparent;\n\tpadding-top: 3px;\n\tfont-size: 20px;\nfont-family: Avenir;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`
#
# AuraHD. No font specified, set to Avenir.
#replace_string = D8C7A4, `* {\n\tbackground-color: transparent;\n\tpadding-top:3px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 21px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`, `* {\n\tbackground-color: transparent;\n\tpadding-top: 3px;\n\tfont-size: 26px;\nfont-family: Avenir;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-leading: 0;\n}`
</Patch>


Edit: Note for kpg.exe: Change "replace_string" to "replace_xor_00" and add "\x00" to the end of the replacement string if using kpg.exe.

Last edited by GeoffR; 05-27-2014 at 04:26 AM. Reason: Note for using kpg.exe
GeoffR is offline   Reply With Quote