View Single Post
Old 05-31-2019, 05:30 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Hi Geoff,

Thank you for another good idea!

I've done some testing. I have to confess that post #1 bamboozled me so I put my effort into the patch in post #2.

Background:
My aim has only ever been to equalise font-sizes in epub/kepub.
Up to now I have been doing this via a kepub font scale-up in kobo_extra.css.
Code:
body>div#book-columns>div#book-inner {font-size:1.5em}
Of all the Kobos I own, this kepub scale-up was necessary on:
  • AuraHD
  • Aura6" (original)
  • H2O (original)
  • GloHD
  • ClaraHD
but not necessary on:
  • AuraOne
  • Forma
My Glo has been out of action for so long that I don't think I ever read any kepubs on it. Consequently I've no idea which of the above 2 groups it belongs in. I'll take your word that it's the second.

Test results:
I successfully used the post #2 patch on all of the above except the GloHD (it's off-limits because my husband is using it). I'd be amazed if its results were different from the ClaraHD.

Practicalities:
Nothing to do with the patch itself, but anyone who was using the kobo_extra.css trick and now wants to switch to this new patch is going to need to:
  • remove the kepub scale-up CSS from their kobo_extra.css file
  • delete all existing kepubs from their Kobo, then resend them
    I just deleted/resent ALL epubs and kepubs because any epubs with font settings stored in the database would now be wrong.

Other info:
  1. For any fw version, I only ever create a single patched KoboRoot.tgz file, then apply it to all my devices. Applying this patch to a KA1 or Forma (which don't need it) doesn't appear to do any harm - maybe it's too soon to state that categorically.
  2. I experimented with the post #2 patch to simplify it, removing the need for hex offsets, i.e. a multi-version patch.
    Code:
      - FindBaseAddressHex: 00 00 C0 42 00 00 10 43
      - ReplaceBytes: {Offset: 6, FindH: 10 43, ReplaceH: C0 42}
    This worked for fw 4.15.12920 on all devices. I also checked about 18 months-worth of libnickel.so.1.0.0 files (back as far as 4.6.xxxxx). The above FindBaseAddressHex string was unique in all of them. (Of course, Sod's Law says that it might not be in the next one )
jackie_w is offline   Reply With Quote