View Single Post
Old 04-19-2022, 09:22 PM   #23
jesson345
Enthusiast
jesson345 began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2021
Device: kobo glo hd
Quote:
Originally Posted by DNSB View Post
I checked the patch and it works for me. Perhaps you could post the log.txt when running the kobopatch batch file?
Please see attachment.
log.txt

libnickel.so.1.0.0.rar


Here is my modification of Un-Force user font-family:

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:
# 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

Now I am back to 4.31 firmware,same patch,it's correct。

THX for your help!

Last edited by jesson345; 04-19-2022 at 09:25 PM.
jesson345 is offline   Reply With Quote