Skip to content

Commit

Permalink
Update most patches for 4.37.21586 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Jul 7, 2023
1 parent 1167c36 commit 499af27
Show file tree
Hide file tree
Showing 14 changed files with 2,302 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/versions/4.37.21586/libadobe.so.yaml/pgaskin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The following patch(es) were fixed and are updated by pgaskin (geek1011)

Remove PDF map widget shown during panning:
- Enabled: no
- Description: Removes the PDF map widget shown during panning and zooming.
- BaseAddress: {Sym: "N3AdobeReader::showMapWidget()"}
# tail: N3AdobeReader::updatePanningMap() -> N3AdobeReader::hideMapWidget()
# TODO: figure out what broke the plt parsing in kobopatch for libadobe in 18730+
- ReplaceBytes: {Offset: 80, FindInstBW: 0x1C1DC, ReplaceInstBW: 0x1B4D4}
- ReplaceBytes: {Offset: 192, FindInstBW: 0x1C1DC, ReplaceInstBW: 0x1B4D4}
465 changes: 465 additions & 0 deletions src/versions/4.37.21586/libnickel.so.1.0.0.yaml/geoffr.yaml

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions src/versions/4.37.21586/libnickel.so.1.0.0.yaml/jackie_w.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# The following patch(es) were made by jackie_w

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.15676: 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
4.32.19501: major font handling changes. Customising font-family now very limited
#
You can change one or more of the following properties:
- font-family (very limited choice from fw >= 4.32.19501)
- font-size
- line-height
#
These are the Kobo defaults
Glo - serif (Georgia) 23px 1.4em
H2O - serif (Georgia) 29px 1.4em
GloHD - serif (Georgia) 32px 1.4em
AuraONE - serif (Georgia) 42px 1.4em
# Stage 1: Change DictionaryView to remove %variables
# from:
# body { padding-left: %3px; }
# body { font: %1px serif; line-height: 1.4em; }
# span.word { font-weight: bold; font-size: 130%; margin-left: -%3px; }
# div.descriptionFont { font-family: serif; }
# ol { font-size: %1px; margin-left: %2em; 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:serif ;}
# body {padding-left:0.5em}
# span.word {font-weight:bold; font-size:130%; margin-left:-0.3em}
# ol {margin-left:1em; margin-top:0}
# blockquote {margin:.3em 0 .3em 1em}
# blockquote>blockquote {margin:-.3em 0 0 2em}
# 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 { padding-left: %3px; }\nbody { font: %1px serif; line-height: 1.4em; }\nspan.word { font-weight: bold; font-size: 130%; margin-left: -%3px; }\ndiv.descriptionFont { font-family: serif; }\nol { font-size: %1px; margin-left: %2em; 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:serif ;}\nbody {padding-left:0.5em}\nspan.word {font-weight:bold; font-size:130%; margin-left:-0.3em}\nol {margin-left:1em; margin-top:0}\nblockquote {margin:.3em 0 .3em 1em}\nblockquote>blockquote {margin:-.3em 0 0 2em}\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

# N.B: From fw 4.32.19508 these are the only customised font-family values reported as having any effect
# The first example will use the default sans-serif font, i.e. Avenir for most non-CJK GUI language locales

# Un-comment ONE ONLY of the following 4 ReplaceString examples
#- ReplaceString: {Offset: 54, Find: "serif ", Replace: "sans-serif", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "serif ", Replace: "'KBJ-TsukuMin Pr6N RB'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "serif ", Replace: "'KBJ-UDKakugo Pr6N M'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "serif ", Replace: "'AR UDJingxihei'", MustMatchLength: yes}

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

# Un-comment and edit next line to change line spacing
#- ReplaceString: {Offset: 34, Find: "1.40em", Replace: "1.30em", MustMatchLength: yes}


Custom navigation menu page number text:
- Enabled: no
- Description: Changes the page number text format in the reading navigation menu
- FindReplaceString: {Find: "Page %1 of %2", Replace: "%1 / %2"}

# The next 2 patches are alternatives. Enable ONE ONLY.
# They have replaced the old patch named 'KePub stylesheet additions'

KePub stylesheet additions - text justify:
- Enabled: no
- PatchGroup: KePub stylesheet additions alternatives
- Description: Make full justification the default in KePubs
- FindBaseAddressString: ".KBSearchResult, .KBAnnotation, .KBHighlighting {"
# *** Don't change anything in the 4 ReplaceString lines below ***
- ReplaceString: {Find: ".KBSearchResult, .KBAnnotation, .KBHighlighting { font-size: 100% !important; -webkit-text-combine: inherit !important; }\n", Replace: ".KBSearchResult,.KBAnnotation,.KBHighlighting{font-size:100%!important;-webkit-text-combine:inherit!important}.KBAnnotatio", MustMatchLength: yes}
- ReplaceString: {Offset: 122, Find: ".KBAnnotation[writingMode=\"horizontal-tb\"] { border-bottom: 2px solid black !important; }\n", Replace: "n[writingMode=\"horizontal-tb\"]{border-bottom:2px solid #000!important}.KBAnnotation[writin", MustMatchLength: yes}
- ReplaceString: {Offset: 212, Find: ".KBAnnotation[writingMode=\"vertical-rl\"] { border-right: 2px solid black !important; }\n", Replace: "gMode=\"vertical-rl\"]{border-right:2px solid #000!important}.KBAnnotation[writingMode=\"v", MustMatchLength: yes}
- ReplaceString: {Offset: 299, Find: ".KBAnnotation[writingMode=\"vertical-lr\"] { border-left: 2px solid black !important; }", Replace: "ertical-lr\"]{border-left:2px solid #000!important}/*********************************/", MustMatchLength: yes}
# *** Don't change anything in the 4 ReplaceString lines above ***
#
- FindReplaceString: {Find: "/*********************************/", Replace: "body{text-align:justify }", MustMatchLength: yes}

KePub stylesheet additions - word-spacing:
- Enabled: no
- PatchGroup: KePub stylesheet additions alternatives
- Description: |
Reduces the space between words in KePubs.
Probably only useful to those who prefer to read KePubs with left/right full justification, i.e. not ragged-right edge.
See https://www.mobileread.com/forums/showpost.php?p=4217711&postcount=28
for screenshots showing the effect of enabling this patch.
- FindBaseAddressString: ".KBSearchResult, .KBAnnotation, .KBHighlighting {"
# *** Don't change anything in the 4 ReplaceString lines below ***
- ReplaceString: {Find: ".KBSearchResult, .KBAnnotation, .KBHighlighting { font-size: 100% !important; -webkit-text-combine: inherit !important; }\n", Replace: ".KBSearchResult,.KBAnnotation,.KBHighlighting{font-size:100%!important;-webkit-text-combine:inherit!important}.KBAnnotatio", MustMatchLength: yes}
- ReplaceString: {Offset: 122, Find: ".KBAnnotation[writingMode=\"horizontal-tb\"] { border-bottom: 2px solid black !important; }\n", Replace: "n[writingMode=\"horizontal-tb\"]{border-bottom:2px solid #000!important}.KBAnnotation[writin", MustMatchLength: yes}
- ReplaceString: {Offset: 212, Find: ".KBAnnotation[writingMode=\"vertical-rl\"] { border-right: 2px solid black !important; }\n", Replace: "gMode=\"vertical-rl\"]{border-right:2px solid #000!important}.KBAnnotation[writingMode=\"v", MustMatchLength: yes}
- ReplaceString: {Offset: 299, Find: ".KBAnnotation[writingMode=\"vertical-lr\"] { border-left: 2px solid black !important; }", Replace: "ertical-lr\"]{border-left:2px solid #000!important}/*********************************/", MustMatchLength: yes}
# *** Don't change anything in the 4 ReplaceString lines above ***
#
# Customise the -0.05 value if you prefer.
# N.B. Be careful, if it's too big some words may get joined together.
- FindReplaceString: {Find: "/*********************************/", Replace: "body{word-spacing:-0.05em }", MustMatchLength: yes}

# KePub stylesheet additions - optimizeSpeed: retired
# KePub stylesheet additions - optimizeLegibility: retired
# Edit Kobo config (.kobo/Kobo/Kobo eReader.conf) to achieve same result.
# For more detail, see MR post https://www.mobileread.com/forums/showpost.php?p=4215805&postcount=40

23 changes: 23 additions & 0 deletions src/versions/4.37.21586/libnickel.so.1.0.0.yaml/jcn363.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The following patch(es) are ported from jcn363's patches

Shorten dictionary entry not found message:
- Enabled: no
- Description: |
Idea by pakoe
cf. https://www.mobileread.com/forums/showpost.php?p=3043631&postcount=111
- FindReplaceString:
Find: "Your search for &ldquo;%1&rdquo; did not match any words in the dictionary. The closest match was &ldquo;%2&rdquo;."
Replace: "No match for &ldquo;%1&rdquo;, closest match was &ldquo;%2&rdquo;."

Change Wikipedia search language:
- Enabled: no
- Description: |
The patch set the search language in Wikipedia.
Replace the "en" (in both the replace_string lines) to language code you want.
For example English is "en" (set as default), for German is "de", for Russian is "ru".
- FindReplaceString:
Find: "\0https://%1.m.wikipedia.org/wiki/Special:Search\0"
Replace: "\0https://es.m.wikipedia.org/wiki/Special:Search\0"
- FindReplaceString:
Find: "\0https://%1.wikipedia.org/wiki/Special:Search\0"
Replace: "\0https://es.wikipedia.org/wiki/Special:Search\0"
Loading

0 comments on commit 499af27

Please sign in to comment.