View Single Post
Old 02-25-2020, 12:43 PM   #2
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by fer1803 View Post
Three alternatives appear in this patch. As it appears in the file, "Alternatives 1-3 give increasing preference to the publisher-selected fonts." Well, what should I do to apply each of these alternatives? do I have to change something in the file? thank you in advance
Option 1 is enabled as the default. If you wanted to enable option 2 instead you would need to:
  • un-comment each line in option 2's ReplaceString, by removing the hash (#) character at the beginning of each line.
  • comment out each line of option 1's ReplaceString by adding a hash at the beginning of each line.
  • Also make sure you keep the correct indentation of each of option 2's lines.
i.e.
Code:
    # Alternative 1:
    #     * { font-family: %1 !important; }\n
    # --> div,p{font-family:%1!important; }\n
  #- ReplaceString:
  #    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
ETA: I don't think the red line is necessary.

Last edited by jackie_w; 02-25-2020 at 12:47 PM. Reason: ETA
jackie_w is offline   Reply With Quote