View Single Post
Old 04-07-2024, 06:21 PM   #27
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,257
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@hatuluang,

Try the attached new beta patch instead. Put it in nickel.yaml or wherever you keep all your other customised nickel.yaml patches.

You'll need to disable both the old patches:
Custom synopsis details line spacing
Custom synopsis font size


and enable this new one:
Custom synopsis details all-in-one
Spoiler:
Code:
Custom synopsis details all-in-one:
  - Enabled: no
  - Description: |
      Customise synopsis body style in Book details,
        including font-size, line-height
      Add style(s) for p tags
  - FindZlib: "body[qApp_deviceIsTrilogy=true] {\n  line-height: 1.45em;" # qss/BookDetails.qss
  - ReplaceZlibGroup:
      Replacements:
        # modify <body> style, customise line-height here
        # Add style(s) for <p> tags
        - Find:    "body {\n  font-family: Georgia;\n  margin: 0px;\n  padding: 0px;\n}"
          Replace: "body {font-family:Georgia; margin:0; padding:0; line-height:1.3em;}\np {margin:0.5em 0 0 0; text-indent:1.5em;}"
        
        # customise font-size by model
        - {Find: "font-size: 19px;", Replace: "font-size:20px;"} # Touch/Mini (Trilogy)
        - {Find: "font-size: 23px;", Replace: "font-size:25px;"} # Glo/Aura/Aura2E/Nia (Phoenix)
        - {Find: "font-size: 29px;", Replace: "font-size:32px;"} # AuraHD/AuraH2O/AuraH2O2 (Dragon)
        - {Find: "font-size: 32px;", Replace: "font-size:35px;"} # GloHD/ClaraHD/Clara2E (Alyssum/Nova)
        - {Find: "font-size: 34px;", Replace: "font-size:37px;"} # LibraH2O/Libra2 (Storm)
        - {Find: "font-size: 37px;", Replace: "font-size:40px;"} # AuraONE/Forma/Sage/Elipsa/Elipsa2E (Daylight)

        # remove all per-model line-heights to create space for above code
        # line-height customisation is now done in the 1st Find/Replace
        ### DO NOT CHANGE OR REMOVE THESE LINES ###
        - {Find: "body[qApp_deviceIsTrilogy=true] {\n  line-height: 1.45em;\n}\n", Replace: "\n"}
        - {Find: "body[qApp_deviceIsPhoenix=true] {\n  line-height: 1.4em;\n}\n", Replace: "\n"}
        - {Find: "body[qApp_deviceIsDragon=true] {\n  line-height: 1.35em;\n}\n", Replace: "\n"}
        - {Find: "body[qApp_deviceIsStorm=true] {\n  line-height: 1.35em;\n}\n", Replace: "\n"}
        - {Find: "body[qApp_deviceIsDaylight=true] {\n  line-height: 1.35em;\n}\n", Replace: "\n"}
        
        # create even more space. 
        # If you set your Kobo to one of the following 4 Japanese/Chinese locales,
        # then comment out the line corresponding to this locale
        - {Find: "body[localeName=\"ja\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n}\n",   Replace: "\n"}
        - {Find: "body[localeName=\"zh\"] {\n  font-family: Sans-SerifZH-Simplified, sans-serif;\n  font-style: normal;\n}\n",   Replace: "\n"}
        - {Find: "body[localeName=\"zh-HK\"] {\n  font-family: Sans-SerifZH-Traditional, sans-serif;\n  font-style: normal;\n}\n",   Replace: "\n"}
        - {Find: "body[localeName=\"zh-TW\"] {\n  font-family: Sans-SerifZH-Traditional, sans-serif;\n  font-style: normal;\n}\n",   Replace: "\n"}
  • line-height is now customised in the 1st Find/Replace. This value is no longer model-specific.
  • font-size is still model-specific and is customised in the relevant line in the second block of Find/Replaces.
  • the rest of the patch code exists to clear enough space so that kobopatch.bat (or kobopatch.sh) doesn't fail. If you never set your Kobo to use any of the Japanese or Chinese locales then you don't need to change anything in this code.

ETA: For anyone finding this post wanting to run this custom synopsis patch on new 2024 devices (Libra Colour, Clara Colour, Clara BW) using fw >=4.39.xxxxx please see post #42 for a couple of minor edits you'll need to make.

Last edited by jackie_w; 03-04-2025 at 02:21 PM. Reason: ETA: Update for new Kobo 2024 devices, fw 4.39 onwards
jackie_w is offline   Reply With Quote