kobopatch-conf/src/librmsdk.so.1.0.0.yaml

170 lines
9.2 KiB
YAML

# The following patch(es) are ported from GeoffR's patch zips
Disable orphans/widows avoidance:
- Enabled: no
- Description: Enable this patch to avoid blank lines at the bottom of pages in ePub books.
# The default values of orphans:2; widows:2; cause extra blank lines to be added
# to some pages to avoid leaving isolated lines of a paragraph at the top or
# bottom of a page. Enabling this patch effectively forces orphans:1; widows:1;,
# overriding the defaults and the book's stylesheet.
#
# Beware that this patch might(?) intefere with related CSS properties such as
# page-break-after:avoid; or page-break-inside:avoid;. A better solution would
# be to edit the book's stylesheet to set orphans:1; widows:1;.
- ReplaceBytes:
Base: "_ZN6layout13FlowProcessor17getPageBreakScoreEbbbbf"
Offset: 80
FindH: E6 D0
ReplaceH: E6 E7
Default ePub serif font (Amasis):
- Enabled: no
- Description: |
This patch changes the default ePub serif font from Georgia to Amasis.
If the book's stylesheet specifies the generic 'font-family:serif;' then
the ePub reader will try to use the built-in system font Georgia.
Georgia is also the font you see if you select 'Publisher Default' from
the Kobo [Aa] menu and your epub has not specified any particular font.
This patch allows you to change the default to a different serif font
(built-in or sideloaded).
N.B. This patch does not affect kepubs.
# fw 4.32.19501: The font-family name in Replace: must now be the WHOLE name
# not just the first few characters of the name.
# To use a different font, change "Amasis" in each replacement string
# to another font name (7 characters max).
# For example, change "Amasis" to "Bitter" to use a sideloaded Bitter font.
#
# If your new font name is longer than 7 chars you would need to:
# - Use a font editor to shorten the internal font-family name to <= 7 chars
# - Rename the 4 font filenames to match the new shortened name
# - Copy the 4 renamed font files into the Kobo sideloaded fonts folder
- FindReplaceString: {Find: "/normal/Georgia", Replace: "/normal/Amasis"}
- FindReplaceString: {Find: "/bold/Georgia", Replace: "/bold/Amasis"}
- FindReplaceString: {Find: "/italic/Georgia", Replace: "/italic/Amasis"}
- FindReplaceString: {Find: "/bolditalic/Georgia", Replace: "/bolditalic/Amasis"}
Default ePub sans-serif font (Gill Sans):
- Enabled: no
- Description: |
This patch changes the default ePub sans-serif font from
'Avenir Next' to 'Gill Sans'.
If the book's stylesheet specifies the generic 'font-family:sans-serif;' then
the ePub reader will try to use the built-in system font 'Avenir Next'.
This patch allows you to change the default to a different sans-serif font
(built-in or sideloaded).
N.B. This patch does not affect kepubs.
# fw 4.32.19501: The font-family name in Replace: must now be the WHOLE name
# not just the first few characters of the name.
# To use a different font, change "Gill%20Sans" in each replacement string
# to another font name (13 characters max).
# For example change "Gill%20Sans" to "Trebuchet" to use a sideloaded Trebuchet font.
# The 3-char string, %20, represents a single space in the font-family name.
#
# If your new font name is longer than 13 chars you would also need to:
# - Use a font editor to shorten the internal font-family name to <= 13 chars
# - Rename the 4 font filenames to match the new shortened name
# - Copy the 4 renamed font files into the Kobo sideloaded fonts folder
- FindReplaceString: {Find: "/normal/Avenir%20Next", Replace: "/normal/Gill%20Sans"}
- FindReplaceString: {Find: "/bold/Avenir%20Next", Replace: "/bold/Gill%20Sans"}
- FindReplaceString: {Find: "/italic/Avenir%20Next", Replace: "/italic/Gill%20Sans"}
- FindReplaceString: {Find: "/bolditalic/Avenir%20Next", Replace: "/bolditalic/Gill%20Sans"}
Default ePub symbol font (Symbol):
- Enabled: no
- Description: Sets the ePub default symbol font? I Don't know what this does!
- FindReplaceString: {Find: "/SymbolStd.otf", Replace: "/normal/Symbol"}
Force user line spacing in ePubs (Part 2 of 2):
- Enabled: no
- Description: |
This is part 2 of 2. Also enable part 1 in libnickel.so.1.0.0.patch
This patch prevents any line-height style set in the book's stylesheet from
being recognised. It will spoil the formatting of some books, but will ensure
that the line spacing set with the adjustment slider takes effect. (Unless
the publisher has used the font shorthand style; see option below.)
- FindBaseAddressString: "\0line-height\0"
- ReplaceString: {Offset: 1, Find: "l", Replace: "_"}
# Uncomment the following two lines to also prevent the font shorthand style
# from being recognised. The font shorthand style is not very common in ePubs,
# but where used it can also prevent the line spacing from being adjusted.
# Beware that this option will likely have much bigger side-effects on the
# book's formatting, because the font shorthand style is used to set the
# font-size, font family, and other styles in addition to line-height.
# - ReplaceString: {Offset: 1, Find: "f", Replace: "_"}
# - FindBaseAddressString: "\0font\0"
Force user font-family in ePubs (Part 2 of 2):
- Enabled: no
- Description: |
This is part 2 of 2. Also enable part 1 in libnickel.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.
(Unless the publisher has used the font shorthand style; see option below.)
- FindBaseAddressString: "\0font-family\0"
- ReplaceString: {Offset: 1, Find: "f", Replace: "_"}
# Uncomment the following two lines to also prevent the font shorthand style
# from being recognised. The font shorthand style is not very common in ePubs,
# but where used it can also prevent the font-family from being adjusted.
# Beware that this option will likely have much bigger side-effects on those
# book's formatting, because the font shorthand style is used to set the
# font-size, line-height, and other styles in addition to font-family.
# - ReplaceString: {Offset: 1, Find: "f", Replace: "_"}
# - FindBaseAddressString: "\0font\0"
Ignore ePub book Adobe XPGT stylesheet (page-template.xpgt):
- Enabled: no
- Description: |
Not all ePubs have an Adobe XPGT stylesheet, and the ones that do often use
it mainly to set the page margins. Unfortunately those margins are added to
the page margins set via @page in the CSS stylesheet, and cannot be overidden
by the `ePub fixed/ajustable top/bottom margins` patch.
This patch should cause any Adobe XPGT stylesheet in the book to be ignored,
but for the book's CSS stylesheet still to be used as normal.
(You might prefer to remove the margins from the book's XPGT stylesheet
before sideloading, instead of using this patch. Calibre's Modify ePub plugin
has a useful option for doing this.)
- FindBaseAddressString: "\0template\0"
- ReplaceString: {Offset: 1, Find: "t", Replace: "_"}
# The following two patches will not be useful to most people, don't enable them unless you are sure you need them.
Ignore ePub book CSS and Adobe XPGT stylesheets:
- Enabled: no
- FindBaseAddressString: "\0stylesheet\0"
- ReplaceString: {Offset: 1, Find: "s", Replace: "_"}
- FindBaseAddressString: "\0style-sheet\0"
- ReplaceString: {Offset: 1, Find: "s", Replace: "_"}
Ignore ePub TOC navpoints:
- Enabled: no
- FindBaseAddressString: "\0navPoint\0"
- ReplaceString: {Offset: 1, Find: "n", Replace: "_"}
# The following patches are by jackie_w.
Default ePub monospace font:
- Enabled: no
- Description: |
Updated for fw 4.19.14123:
The Kobo firmware doesn't include a monospace font, you need to sideload one.
If the book's stylesheet specifies the generic font-family:monospace;
then the ePub reader will try to use the 'Courier' font.
N.B. This patch does not affect kepubs.
# fw 4.32.19501: A font whose name begins with 'Courier' e.g. 'Courier Prime'
# will no longer be recognised as the default monospace font for epub.
# The font-family name must now be exactly 'Courier'.
# You do not need this patch if you have already installed a font
# named 'Courier' in the Kobo sideloaded fonts folder.
# The only users who might want this patch are those whose preferred
# sideloaded monospace font has a name other than 'Courier' and whose
# font-family name is <= 7 characters.
#
# To use a different font, change 'Courier' in each of the Replace: strings
# to another sideloaded font name (7 characters max).
- FindReplaceString: {Find: "/normal/Courier", Replace: "/normal/Courier"}
- FindReplaceString: {Find: "/bold/Courier", Replace: "/bold/Courier"}
- FindReplaceString: {Find: "/italic/Courier", Replace: "/italic/Courier"}
- FindReplaceString: {Find: "/bolditalic/Courier", Replace: "/bolditalic/Courier"}