Quote:
Originally Posted by henriquemaia
I'm running 3.1.1, so I'm sure willing to give it a try. I'll be thankful if you provide such values.
|
Here you have: (to whoever want to apply these patches, please do not forget to read this post first
https://www.mobileread.com/forums/sho...&postcount=456 ,for all details and notes related)
edit: warning: untested yet on 3.1.1
Code:
# For 3.1.1
<Patch>
patch_name = `Force user selected font (Ignore external font-family in CSS and style tag)`
patch_enable = `yes`
# Warning: This is an EXPERIMENTAL patch will replace all "font-family" to "_ont-family"
# ALL patches - except the last one - are necessary since they all rely to the change of the last one.
# This is barbarian, dirty workaround and maybe unsafe, but in waiting for better... (ONLY for .epub Does NOT work for .kepub)
# Patch by byblo
replace_string = 010FDF8C, `f`, `_`
replace_string = 010FDFB8, `f`, `_`
replace_string = 010FDFD4, `f`, `_`
replace_string = 01117DA1, `f`, `_`
replace_string = 01117E19, `f`, `_`
replace_string = 01117E91, `f`, `_`
replace_string = 01117F09, `f`, `_`
replace_string = 01117F7A, `f`, `_`
replace_string = 01145CD4, `f`, `_`
replace_string = 01145F25, `f`, `_`
replace_string = 01146511, `f`, `_`
replace_string = 011490C0, `f`, `_`
replace_string = 01149250, `f`, `_`
replace_string = 01149498, `f`, `_`
replace_string = 01149C06, `f`, `_`
replace_string = 0114A03D, `f`, `_`
replace_string = 0114C6D9, `f`, `_`
replace_string = 011506B2, `f`, `_`
replace_string = 011668C8, `f`, `_`
#Note: this is the main entry that has to be replaced to avoid reading font-family on CSS and <style> tags
replace_string = 01445924, `f`, `_`
</Patch>
<Patch>
patch_name = `Force user selected line spacing (Ignore external line-height in CSS and style tag)`
patch_enable = `yes`
# Warning: This is an EXPERIMENTAL patch will replace all "line-height" to "_ine-height"
# ALL patches - except the last one - are necessary since they all rely to the change of the last one.
# This is barbarian, dirty workaround and maybe unsafe, but in waiting for better... (ONLY for .epub Does NOT work for .kepub)
# Patch by byblo
replace_string = 01117FCD, `l`, `_`
replace_string = 01145AF6, `l`, `_`
replace_string = 011494AC, `l`, `_`
replace_string = 0114A079, `l`, `_`
replace_string = 0114C70D, `l`, `_`
replace_string = 01150687, `l`, `_`
replace_string = 01167DA6, `l`, `_`
replace_string = 0116A5E8, `l`, `_`
replace_string = 0116A611, `l`, `_`
replace_string = 0116A64C, `l`, `_`
#Note: this is the main entry that has to be replaced to avoid reading line-height on CSS and <style> tags
replace_string = 014445F0, `l`, `_`
</Patch>
<Patch>
patch_name = `Force aspect ratio on pictures (Ignore preserveAspectRatio)`
patch_enable = `yes`
#force to keep aspect ratio of the picture by ignoring the preserveAspectRatio entry (half confirmed. works well when preserveAspectRatio=none)
#can be useful to keep aspect ratio on covers ect...
# Patch by byblo (ONLY for .epub Does NOT work for .kepub)
replace_string = 01442620, `p`, `_`
</Patch>
Note: BTW, I just tried the .epub.kepub edit:'in 3.0.0', without any success (font and line spacing still locked)
This suggest that the values patched (see the code above) are NOT used by the .kepub renderer. (and if needed, the values to patch for kepub should be to find in another file of the firmware package?)