This patch should make the ePub reader ignore all font-family styles in the book's stylesheet, so that the only font used is the one selected from the device.
It could spoil the formatting of some books because it won't be possible for the publisher to use multiple fonts in the same book, e.g. serif/sans-serif/monospace text will all be rendered with the same font. A better approach would be to edit the book's stylesheet ato selectively change the font-family styles for the main body text and leave other special styles in place, but the advantage of the patch is that it should work with DRM books too.
This is a two-part patch, you need to
enable or disable both parts together. It should work on all firmware versions 3.3.0 - 4.1.7729 and maybe later versions too. It hasn't been tested much, so let me know if there are problems.
`Force user font-family in ePubs (Part 1 of 2)` (lib
nickel.so.1.0.0.patch)
Spoiler:
Code:
<Patch>
patch_name = `Force user font-family in ePubs (Part 1 of 2)`
patch_enable = `yes`
# Multi-version patch: 3.3.0 - 4.1.7729+
#
## This is part 1 of 2. Also enable part 2 in librmsdk.so.1.0.0.patch
##
## This patch prevents any font-family style set in the book's stylesheet from
## being recognised. It might spoil the style of books which use multiple fonts,
## but will ensure that the font-family set from the device menu takes effect.
#
find_base_address = `f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0-\0d\0e\0f\0a\0u\0l\0t\0;\0 \0f\0o\0n\0t\0-\0s\0t\0y\0l\0e\0:\0 \0n\0o\0r\0m\0a\0l\0;\0 \0f\0o\0n\0t\0-\0w\0e\0i\0g\0h\0t\0:\0 \0n\0o\0r\0m\0a\0l\0;\0`
replace_string = 0000, `f`, `_`
find_base_address = `f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0-\0d\0e\0f\0a\0u\0l\0t\0;\0 \0f\0o\0n\0t\0-\0s\0t\0y\0l\0e\0:\0 \0i\0t\0a\0l\0i\0c\0;\0 \0f\0o\0n\0t\0-\0w\0e\0i\0g\0h\0t\0:\0 \0n\0o\0r\0m\0a\0l\0;\0`
replace_string = 0000, `f`, `_`
find_base_address = `f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0-\0d\0e\0f\0a\0u\0l\0t\0;\0 \0f\0o\0n\0t\0-\0s\0t\0y\0l\0e\0:\0 \0i\0t\0a\0l\0i\0c\0;\0 \0f\0o\0n\0t\0-\0w\0e\0i\0g\0h\0t\0:\0 \0b\0o\0l\0d\0;\0`
replace_string = 0000, `f`, `_`
find_base_address = `f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0-\0d\0e\0f\0a\0u\0l\0t\0;\0 \0f\0o\0n\0t\0-\0s\0t\0y\0l\0e\0:\0 \0n\0o\0r\0m\0a\0l\0;\0 \0f\0o\0n\0t\0-\0w\0e\0i\0g\0h\0t\0:\0 \0b\0o\0l\0d\0;\0`
replace_string = 0000, `f`, `_`
find_base_address = `f\0o\0n\0t\0-\0f\0a\0m\0i\0l\0y\0:\0 \0-\0u\0a\0-\0d\0e\0f\0a\0u\0l\0t\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0`
replace_string = 0000, `f`, `_`
</Patch>
`Force user font-family in ePubs (Part 2 of 2)` (lib
rmsdk.so.1.0.0.patch)