View Single Post
Old 04-05-2019, 11:17 PM   #19
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
I don't know if this will work, and even if it does then there might be side-effects for Japanese or Chinese language books, but if someone wants to try it and find out ...

Freedom to advanced fonts control, paste into libnickel.so.1.0.0.yaml:
Spoiler:
Code:
Freedom to advanced fonts control:
  - Enabled: no
  - Description: |
      This patch allows the advanced font options (weight/sharpness adjustments)
      to work with sideloaded fonts too. (KEPUB: OTF and TTF. EPUB: TTF only.)
      Beware unknown side-effects for Japanese or Chinese language books.
    #
    # The following passes a junk pointer to N3FontTypeUtil::setupDropdown, but it
    # seems the pointer is only passed on to ReadingSettings::getDefaultFontFamily
    # where the code is patched to avoid dereferencing it, so it should be safe.
    # BEWARE: What are the side-effects for Japanese / Chinese language books?
    #
    # N3FontTypeUtil.setupMonotypeDropdown(b,c)
    # --> N3FontTypeUtil.setupDropdown(UNDEFINED,b,c)
  - ReplaceBytes: {Offset: 0x8432E4, FindH: 59 46 50 46, ReplaceH: 5A 46 51 46}
  - ReplaceBLX: {Offset: 0x8432E8, Find: 0x4073B8, Replace: 0x41F440}
    # N3FontTypeController.setupAdvancedOption(...) --> NOP
  - ReplaceBytesNOP: {Offset: 0x9FB23A, FindBLX: 0x422810}
  - ReplaceBytesNOP: {Offset: 0x9FC1D0, FindBLX: 0x422810}
    # Ignore volume language (affects language number 25; ja? zh?)
  - ReplaceBytesNOP: {Offset: 0x65F7EA, FindBLX: 0x415B74}
  - ReplaceBytesNOP: {Offset: 0x65F7F0, FindBLX: 0x41D354}
  - ReplaceBytes: {Offset: 0x65F7F4, FindH: 06 46, ReplaceH: 00 26}
  - ReplaceBytesNOP: {Offset: 0x65F7F8, FindBLX: 0x40E5B4}

Last edited by GeoffR; 04-05-2019 at 11:25 PM. Reason: edited patch comments
GeoffR is offline   Reply With Quote