View Single Post
Old 05-01-2024, 12:35 AM   #35
tretneo
Junior Member
tretneo began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2024
Device: Kobo Libra 2
I'm trying to follow the steps outlined in this thread to fix the Synopsis font size and spacing issues I'm having on my Libra 2. I've applied the Custom synopsis details all-in-one patch (code below) and added the suggested plugboard and the font size is improved but the spacing is still terrible.

nickel.yaml
Code:
Custom synopsis details all-in-one:
  - Enabled: yes
  - 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.25em;}\np {margin:0.5em 0 0 0; text-indent:0.0em;}"
        
        # customise font-size by model
        - {Find: "font-size: 34px;", Replace: "font-size:42px;"} # LibraH2O/Libra2 (Storm)

        # 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"}
Here's a Comments HTML example from calibre
Code:
<div>
<p>“An impressive work of mythic magnitude that may turn out to be Stephen King’s greatest literary achievement” (The Atlanta Journal-Constitution), The Gunslinger is the first volume in the epic Dark Tower Series.</p>
<p>A #1 national bestseller, The Gunslinger introduces readers to one of Stephen King’s most powerful creations, Roland of Gilead: The Last Gunslinger. He is a haunting figure, a loner on a spellbinding journey into good and evil. In his desolate world, which mirrors our own in frightening ways, Roland tracks The Man in Black, encounters an enticing woman named Alice, and begins a friendship with the boy from New York named Jake.</p>
<p>Inspired in part by the Robert Browning narrative poem, “Childe Roland to the Dark Tower Came,” The Gunslinger is “a compelling whirlpool of a story that draws one irretrievable to its center” (Milwaukee Sentinel). It is “brilliant and fresh…and will leave you panting for more” (Booklist). </p></div>
With the above in place I have large spacing before the first paragraph in the Synopsis and between each subsequent paragraph. What am I missing?
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-04-30 at 9.34.27 PM.png
Views:	329
Size:	283.7 KB
ID:	207959   Click image for larger version

Name:	IMG_0012.jpg
Views:	349
Size:	807.4 KB
ID:	207960  
tretneo is offline   Reply With Quote