View Single Post
Old 05-27-2014, 07:26 AM   #126
violent23
Connoisseur
violent23 will become famous soon enoughviolent23 will become famous soon enoughviolent23 will become famous soon enoughviolent23 will become famous soon enoughviolent23 will become famous soon enoughviolent23 will become famous soon enough
 
violent23's Avatar
 
Posts: 83
Karma: 674
Join Date: Oct 2010
Device: Kindle Oasis 2017, Kindle Voyage, Kindle Paperwhite, Kindle Keyboard
Quote:
Originally Posted by GeoffR View Post
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.
Thanks for this, is there a similar code to set the footer to match?

Quote:
Originally Posted by tshering View Post
You could simply delete the fonts that you don't want to use. If you don't want to modify your device in order to be able to run scripts or execute commands, you could also overwrite the font files with empty files via the update mechanism.
How does one go about removing the fonts they do not want and how will this effect the Document Default setting if/when all system fonts are removed and only custom fonts remain?

Last edited by violent23; 05-27-2014 at 07:29 AM.
violent23 is offline   Reply With Quote