View Single Post
Old 12-08-2020, 03:47 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,851
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by tayseidel View Post
That's exactly the spacing I want. What are your settings for the patches?
These are the patches I use to modify the footer.

From libnickel.so.1.0.0.yaml
Code:
Don't uppercase header/footer text and change page number text:
  - Enabled: yes
  - Description: Combines the previous two patches.
  - PatchGroup: Header/footer page number text
  - ReplaceBytes:
      Base:            "ReadingView::getChapterTitle()"
      Offset:          282
      FindInstBLX:     {SymPLT: "QString::toUpper() const"}
      ReplaceInstBLX:  {SymPLT: "QString::trimmed() const"}
  - ReplaceBytes:
      Base:            "ReadingView::updateFooter()"
      Offset:          26
      FindInstBLX:     {SymPLT: "QString::toUpper() const"}
      ReplaceInstBLX:  {SymPLT: "QString::trimmed() const"}
  - FindReplaceString: {Find: "%1 OF %2", Replace: "%1 / %2"}
  - FindReplaceString: {Find: "%1% READ", Replace: "%1% read"}
From nickel.yaml
Code:
Reduce new header/footer height:
  - Enabled: yes
  - Description: |
        Reduce new reading header/footer heights when they are enabled.
        Affects both ePubs and KePubs.
        This patch may be of interest to those who used to enable the old
        "Custom menubar - reduce height by 33%"
  - FindZlib: "ReadingFooter"
  - ReplaceZlibGroup:
      # Adjust the Replace values of min-height/max-height as you wish.
      # Keep min-height=max-height
      Replacements:
        # ReadingFooter Reduce min/max height by 33%
        # Touch/Mini (Trilogy)
      - Find:    "ReadingFooter[qApp_deviceIsTrilogy=true] {\n  min-height: 56;\n  max-height: 56px;\n}"
        Replace: "ReadingFooter[qApp_deviceIsTrilogy=true] {\n  min-height: 37px;\n  max-height: 37px;\n}"
        # Glo/Aura/Aura2E (Phoenix)
      - Find:    "ReadingFooter[qApp_deviceIsPhoenix=true] {\n  min-height: 71px;\n  max-height: 71px;\n}"
        Replace: "ReadingFooter[qApp_deviceIsPhoenix=true] {\n  min-height: 47px;\n  max-height: 47px;\n}"
        # AuraHD/H2O/GloHD/ClaraHD (Dragon)
      - Find:    "ReadingFooter[qApp_deviceIsDragon=true] {\n  min-height: 101px;\n  max-height: 101px;\n}"
        Replace: "ReadingFooter[qApp_deviceIsDragon=true] {\n  min-height: 45px;\n  max-height: 45px;\n}"
        # AuraOne/Forma (Daylight)
      - Find:    "ReadingFooter[qApp_deviceIsDaylight=true] {\n  min-height: 131px;\n  max-height: 131px;\n}"
        Replace: "ReadingFooter[qApp_deviceIsDaylight=true] {\n  min-height: 86px;\n  max-height: 86px;\n}"
        # LibraH2O (Storm)
      - Find:    "ReadingFooter[qApp_deviceIsStorm=true] {\n  min-height: 118px;\n  max-height: 118px;\n}"
        Replace: "ReadingFooter[qApp_deviceIsStorm=true] {\n  min-height: 78px;\n  max-height: 78px;\n}"

Custom new header/footer font:
  - Enabled: yes
  - Description: |
        This patch allows you to change font-family and/or font-size in the 
        new header/footer. They will automatically be a matched pair. Full details & screenshots at 
        https://www.mobileread.com/forums/showpost.php?p=3897175&postcount=4
        N.B: This patch is not suitable for Japanese/Chinese locale users
        fw 4.23.15505 No longer possible to customise font-size for GloHD/ClaraHD
            separately from AuraHD/H2O. 

  - FindZlib: "ReadingFooter"
  - ReplaceZlibGroup:
      Replacements:
        # Part 1. Customise font-family (built-in or sideloaded font)
        #         Please see notes at
        #         https://www.mobileread.com/forums/showpost.php?p=3896190&postcount=2
        #         for general considerations whenever you change font-family in the Kobo GUI
        
        # #caption[newHeader=true] and #caption[newFooter=true]
        # N.B: If new font-family contains spaces wrap in 'single quotes', e.g. 'Kobo Nickel'
        
        # Un-comment and edit replacement font-family to change header/footer font
        #- {Find: "font-family: Avenir;", Replace: "font-family:Avenir;"}


        # Part 2. 
        #   2a. Customise font-size for header/footer
        #   2b. (optional) Fine-tune footer text position to avoid cutting bottom progressbar
        #       (optional) Fine-tune header text position to avoid possible shadow from top bezel
        #       May be useful to those who have also enabled patch 'Reduce new header/footer height'
        #       and have customised it to aggressively reduce header/footer height.
        
        # 2a. Change font-size for models other than Touch/Mini (header & footer simultaneously)
        # #caption[newHeader=true] & #caption[newFooter=true]
          # Glo/Aura/Aura2E/Nia (Phoenix)
        - Find:    "[qApp_deviceIsPhoenix=true] {\n  font-size: 17px;\n}"
          Replace: "[qApp_deviceIsPhoenix=true] {\n  font-size: 17px;\n}"
          # AuraHD/H2O/GloHD/ClaraHD (Dragon/Alyssum/Nova)
        - Find:    "[qApp_deviceIsDragon=true] {\n  font-size: 25px;\n}"
          Replace: "[qApp_deviceIsDragon=true] {\n  font-size: 26px;\n}"
          # LibraH2O (Storm)
        - Find:    "[qApp_deviceIsStorm=true] {\n  font-size: 29px;\n}"
          Replace: "[qApp_deviceIsStorm=true] {\n  font-size: 29px;\n}"
          # AuraOne/Forma (Daylight)
        - Find:    "[qApp_deviceIsDaylight=true] {\n  font-size: 32px;\n}"
          Replace: "[qApp_deviceIsDaylight=true] {\n  font-size: 32px;\n}"
          
        # N.B: If you do not have a Touch/Mini and your header/footer 
        #      positions are exactly as you like them you do not need the
        #      next 3 Find/Replace pairs.
        #      Leave them as-is or comment them out entirely and forget about them.

        # Don't change the following pair. It exists to split the header/footer styles
        # which were merged in 4.19.14123.
        - Find:    "#caption[newHeader=true][qApp_deviceIsTrilogy=true],\n#caption[newFooter=true][qApp_deviceIsTrilogy=true] {\n  font-size: 14px;\n}"
          Replace: "#caption[newHeader=true][qApp_deviceIsTrilogy=true] {\n  font-size: 14px;\n}\n#caption[newFooter=true][qApp_deviceIsTrilogy=true] {\n  font-size: 14px;\n}"

        # 2a. Touch/Mini users only: Adjust footer font-size as required.
        # 2b. All models (optional): Fine-tune footer position by adjusting margin-top value
        #     A negative margin-top (e.g -10px) moves the footer text slightly upwards
        #     further from the bottom bezel/progressbar, closer to the page content
        - Find:    "#caption[newFooter=true][qApp_deviceIsTrilogy=true] {\n  font-size: 14px;\n}"
          Replace: "#caption[newFooter=true] {\n  font-size: 13px; margin-top: -25px;}"
        
        # 2a. Touch/Mini users only: Adjust header font-size as required.
        # 2b. All models (optional): Fine-tune header position by adjusting margin-bottom value.
        #     A negative margin-bottom (e.g -10px) moves the header text slightly downwards
        #     further from the top bezel, closer to the page content
        - Find:    "#caption[newHeader=true][qApp_deviceIsTrilogy=true] {\n  font-size: 14px;\n}"
          Replace: "#caption[newHeader=true] {\n  font-size: 13px; margin-bottom: 0px;}"

        # Don't change anything below. It exists to free up some space for
        # your changes above by removing Japanese/Chinese-specific CSS code blocks
        # so that kobopatch will run without giving some kind of 'too long' error message.
        - {Find: "#caption[newHeader=true][localeName=\"ja\"],\n#caption[newFooter=true][localeName=\"ja\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n}\n", Replace: "\n"}
        - {Find: "#caption[newHeader=true][localeName=\"zh\"],\n#caption[newFooter=true][localeName=\"zh\"] {\n  font-family: Sans-SerifZH-Simplified, sans-serif;\n  font-style: normal;\n}\n", Replace: "\n"}
        - {Find: "#caption[newHeader=true][localeName=\"zh-HK\"],\n#caption[newFooter=true][localeName=\"zh-HK\"] {\n  font-family: Sans-SerifZH-Traditional, sans-serif;\n  font-style: normal;\n}\n", Replace: "\n"}
        - {Find: "#caption[newHeader=true][localeName=\"zh-TW\"],\n#caption[newFooter=true][localeName=\"zh-TW\"] {\n  font-family: Sans-SerifZH-Traditional, sans-serif;\n  font-style: normal;\n}\n", Replace: "\n"}
JSWolf is offline   Reply With Quote