Quote:
Originally Posted by MGlitch
I’d really appreciate it if it became a patch. Easier to manage from a user perspective, and no need to reimport books.
|
It should be possible with the caveat that it will be in the libnickel.so.1.0.0.yaml file within
PatchGroup: KePub stylesheet additions alternatives. This means that in fw 4.32.19501 you would only be able to enable one of these:
- KePub stylesheet additions - text justify
- KePub stylesheet additions - optimizeSpeed
- KePub stylesheet additions - optimizeLegibility
- KePub stylesheet additions - word-spacing
Since I'm currently planning to retire patches 2 & 3 at the next fw upgrade you'd be choosing between 1 & 4 in future.
P.S. In case you haven't already noticed, I added a couple of screenshots to my earlier post to show the effect of setting
word-spacing: -0.05em in a kepub.
Here's a beta for the proposed new patch. It should work in fw 4.32.19501 (with the above caveat). Just copy it into your existing
libnickel.so.1.0.0.yaml file and enable it in the normal way.
Spoiler:
Code:
KePub stylesheet additions - word-spacing:
- Enabled: no
- PatchGroup: KePub stylesheet additions alternatives
- Description: Reduces the space between words 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 ***
#
# 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}
Do let me know if you spot any unpleasant side-effects!