View Single Post
Old 12-20-2018, 09:39 AM   #153
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,061
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Quote:
The indent (spaces) is important.
I tried to make it as you proposed:
Code:
Un-Force user font-family in KePubs:
  - Enabled: yes
  - Description: |
      The KePub reader uses a very heavy-handed method of setting the font selected
      by the user, overriding all fonts set by the publisher in the book unless
      "Publisher Default" is selected.
      This patch lets the font-family set by the publisher in the KePub stylesheet
      override the font-family selected by the reader from the device in some
      cases, which allows a mix of user-selected and publisher-selected fonts.
      Alternatives 1-3 give increasing preference to the publisher-selected fonts.
  - FindBaseAddressString: "* { font-family: %1 !important; }\n"
    #
    # Alternative 1:
    #     * { font-family: %1 !important; }\n
    # --> div,p{font-family:%1!important; }\n
# - ReplaceString:
#     Offset: 0
#     Find: "* { font-family: %1 !important; }\n"
#     Replace: "div,p{font-family:%1!important; }\n"
#     MustMatchLength: yes
   #
   # Alternative 2: (Similar to ePub default)
   #     * { font-family: %1 !important; }\n
   # --> body,p{font-family:%1!important;}\n
 - ReplaceString:
     Offset: 0
     Find: "* { font-family: %1 !important; }\n"
     Replace: "body,p{font-family:%1!important;}\n"
     MustMatchLength: yes
    #
    # Alternative 3: (similar to ePub with `Un-force font-family override p tags`)
    #     * { font-family: %1 !important; }\n
    # --> body{font-family:%1 !important; }\n
# - ReplaceString:
#     Offset: 0
#     Find: "* { font-family: %1 !important; }\n"
#     Replace: "body{font-family:%1 !important; }\n"
#     MustMatchLength: yes
but with no result. Shouldn't the values be set to "y"?

Last edited by Leonatus; 12-20-2018 at 09:42 AM. Reason: Edit: The line in question is the red one.
Leonatus is offline   Reply With Quote