Quote:
Originally Posted by dmapr
He didn't  And there's some other goodies in there, too 
|
Great ^^ Many thanks to Metazoa.
Unfortunately, the patch: "Ignore book internal CSS stylesheet" is too aggressive, since it disables everything, even the justification, making text presentation very bad looking. (this said, I made some patches that should help, see below)
Quote:
Originally Posted by DNSB
Also the disable stylesheet only works for CSS in stylesheet files. If you have one of those %^&*(\- epubs that does all the CSS in the chapter files using the <style></style> tags or inline, this has no effect.
|
Here are some patches which seems to work pretty well (ONLY tested with .epub)
There are 3 additions:
- Force user selected font (Ignore external font-family in CSS and style tag)
- Force user selected line spacing (Ignore external line-height in CSS and style tag)
And the little bonus, a fix for something that have been annoying me for a long time, the stretched cover ^^;
- Force aspect ratio on pictures (Ignore preserveAspectRatio)
This is for 3.0.0 firmware only (but it should be easy to apply them to older firmwares)
Code:
<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... (tested ONLY on .epub)
# Patch by byblo
replace_string = 010FB4B1, `f`, `_`
replace_string = 010FB529, `f`, `_`
replace_string = 010FB5A1, `f`, `_`
replace_string = 010FB619, `f`, `_`
replace_string = 010FB68A, `f`, `_`
replace_string = 0112B63D, `f`, `_`
replace_string = 0112BFAC, `f`, `_`
replace_string = 0112C1FD, `f`, `_`
replace_string = 0112EDE9, `f`, `_`
replace_string = 0112F4B2, `f`, `_`
replace_string = 01130690, `f`, `_`
replace_string = 01130FC4, `f`, `_`
replace_string = 0113114C, `f`, `_`
replace_string = 01159268, `f`, `_`
replace_string = 0115D385, `f`, `_`
replace_string = 01161C24, `f`, `_`
replace_string = 01161C50, `f`, `_`
replace_string = 01161C6C, `f`, `_`
replace_string = 01400C27, `f`, `_`
replace_string = 01400E4E, `f`, `_`
#Note: this is the main entry that has to be replaced to avoid reading font-family on CSS and <style> tags
replace_string = 0143C65C, `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... (tested ONLY on .epub)
# Patch by byblo
replace_string = 010FB6DD, `l`, `_`
replace_string = 0112BE32, `l`, `_`
replace_string = 0112EE25, `l`, `_`
replace_string = 011306A4, `l`, `_`
replace_string = 0113A3C4, `l`, `_`
replace_string = 0113A3ED, `l`, `_`
replace_string = 0113A428, `l`, `_`
replace_string = 0115806A, `l`, `_`
replace_string = 0115D3B9, `l`, `_`
replace_string = 0115FB1F, `l`, `_`
#Note: this is the main entry that has to be replaced to avoid reading line-height on CSS and <style> tags
replace_string = 0143B328, `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 (tested ONLY on .epub)
replace_string = 1439358, `p`, `_`
</Patch>
Note: Do not forget to disable the "Ignore book internal CSS stylesheet", or the 2 first patches wont have any effect...
As you can see, the patches will force the ereader to totally ignore the font-famliy & line-height (someone wants to try the net browser?). So I'm not sure it wont mess something else. But as far as I tested, everything on the ereader seems working well.
Here is a test epub, in case needed (attached)