View Single Post
Old 11-10-2020, 04:31 AM   #76
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
Hi Jackie,

Something ugly has happened with your lovely Dictionary text font-family/font-size/line-height patch. Either I'm doing something wrong or the patch is being funny. All I did was increase the font size (admittedly, it's a little too big now, but still), see attached images & code. Both with and without your Dictionary pop-up - increase available text area patch on, the first letter or part of the selected word is cut off in the pop-up box...


Spoiler:

Code:
Dictionary text font-family/font-size/line-height:
  - Enabled: no
  - Description: |
      This patch allows you to to customise the appearance of the text
      in the pop-up and full-screen dictionary widgets.
      4.17.13651: improved to also reduce the blank lines displayed in many
                  sideloaded custom dictionaries which contain <blockquote>.
      4.24.15672: enforced update to accommodate Kobo changes related to new
                  dictionaries being released Oct 1st 2020
      #
      See https://www.mobileread.com/forums/showpost.php?p=3521137&postcount=48
      for screenshots
      .
      You can change one or more of the following properties:
      - font-family
      - font-size
      - line-height
      #
      These are the Kobo defaults
                Glo - Georgia  23px  1.4em
                H2O - Georgia  29px  1.4em
              GloHD - Georgia  32px  1.4em
            AuraONE - Georgia  42px  1.4em

  # Stage 1: Change DictionaryView to remove %variables
  # from:
  #   body { font: %1px %2; line-height: 1.4em; }
  #   span.word { font-weight: bold; font-size: 130%; margin-left: -%5px; }
  #   div.descriptionFont { font-family: %3; }
  #   ol { font-size: %1px; margin-left: %4em; margin-top: 0px; }
  #   ol p { font-size: %1px; }
  #   i, i * { font-style: italic; }
  #   b, b * { font-weight: bold; }
  #   .sc, .sc * { font-variant: small-caps; }
  #   .block, .border { border-radius: 3px; padding: 0em .2em; font-size: 90%; }
  # to:
  #   body {font-size:%1px; line-height:1.40em; font-family:Georgia                ;}
  #   ol {margin-left:.5em; margin-top:0}
  #   blockquote {margin:.3em 0 .3em 1em}
  #   blockquote>blockquote {margin:-.3em 0 0 2em}
  #   span.word {font-weight:bold; font-size:130%; margin-left:-.5em}
  #   i, i * {font-style:italic}
  #   b, b * {font-weight:bold}
  #   .sc, .sc * {font-variant:small-caps}
  #   .block, .border {border-radius:3px; padding:0 .2em; font-size:90%}

  # ##### N.B. Do not change the next 4 lines #####
  - FindReplaceString:
      Find:    "body { font: %1px %2; line-height: 1.4em; }\nspan.word { font-weight: bold; font-size: 130%; margin-left: -%5px; }\ndiv.descriptionFont { font-family: %3; }\nol { font-size: %1px; margin-left: %4em; margin-top: 0px; }\nol p { font-size: %1px; }\ni, i * { font-style: italic; }\nb, b * { font-weight: bold; }\n.sc, .sc * { font-variant: small-caps; }\n.block, .border { border-radius: 3px; padding: 0em .2em; font-size: 90%; }\n"
      Replace: "body {font-size:%1px; line-height:1.40em; font-family:Georgia                  ;}\nol {margin-left:1em; margin-top:0}\nblockquote {margin:.3em 0 .3em 1em}\nblockquote>blockquote {margin:-.3em 0 0 2em}\nspan.word {font-weight:bold; font-size:130%; margin-left:-1em}\ni, i * {font-style:italic}\nb, b * {font-weight:bold}\n.sc, .sc * {font-variant:small-caps}\n.block, .border {border-radius:3px; padding:0 .2em; font-size:90%}\n"
      MustMatchLength: yes
  # ##### N.B. Do not change anything above this line #####

  # Stage 2: N.B. You MUST keep old and new strings EXACTLY the same length

  # Notes for changing font-family:
  #   1.  Pad the shorter of the old/new strings with spaces to
  #       keep same length for both strings (see examples below)
  #
  #   2.  If the new font-family name (max. 25 chars) contains any spaces it
  #       should be wrapped in 'single quotes' (see examples 2, 3)
  #
  #   3.  To change from Georgia to the Kobo default sans-serif font, Avenir,
  #       use either one of the following to achieve the same result:
  #       - sans-serif
  #       - 'Avenir Next Medium'

  # Un-comment ONE ONLY of the following ReplaceString examples
  #   to change dictionary font-family from default Georgia:
  #     - to a different built-in font
  #     - to one of your sideloaded custom fonts

  #- ReplaceString: {Offset: 54, Find: "Georgia   ", Replace: "sans-serif", MustMatchLength: yes}
  #- ReplaceString: {Offset: 54, Find: "Georgia    ", Replace: "'Gill Sans'", MustMatchLength: yes}
  #- ReplaceString: {Offset: 54, Find: "Georgia      ", Replace: "'Kobo Nickel'", MustMatchLength: yes}
  #- ReplaceString: {Offset: 54, Find: "Georgia ", Replace: "Bookerly", MustMatchLength: yes}

  # Un-comment and edit next line to change font-size
  - ReplaceString: {Offset: 16, Find: "%1px", Replace: "40px", MustMatchLength: yes}

  # Un-comment and edit next line to change line spacing
  #- ReplaceString: {Offset: 34, Find: "1.40em", Replace: "1.30em", MustMatchLength: yes}
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2020-11-10 at 10.29.58.png
Views:	327
Size:	802.4 KB
ID:	183309   Click image for larger version

Name:	Screenshot 2020-11-10 at 10.30.06.png
Views:	327
Size:	799.2 KB
ID:	183310  

Last edited by Mrs_Often; 11-10-2020 at 07:31 AM.
Mrs_Often is offline   Reply With Quote