05-05-2015, 08:29 PM | #1 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Index to the Metazoa firmware patches
Instructions for patching firmware (by firmware version):
Patching makes small changes to the Kobo firmware in order to: customise appearance or settings, fix bugs, remove restrictions or unwanted features, and (rarely) to add new features. Patching does not require jailbreaking or rooting, as Kobo e-ink devices are not locked. None of these patches add any extra files to the firmware, but they are applied by installing modified versions of existing files. This means that all these patches will disappear when the firmware is updated, and new patches must be created to apply to each new firmware version. For this reason, when patching it is VERY IMPORTANT TO USE THE CORRECT PATCHES FOR THE FIRMWARE VERSION ON YOUR DEVICE! If you apply the patches for the wrong firmware version the device might not boot, and it will probably require a full factory reset. You can check the firmware version your device is using in the Settings > Device information page: These patches are completely unofficial, so if you have a problem with your patched device don't complain to Kobo. The best place to ask for help is in the instruction thread above for the firmware version you are using. (I refer to these as the Metazoa patches because most were originally created by metazoa at www.the-ebook.org, and as a way to distinguish them from other patches and mods.) Description of what the patches do (all firmware versions):
Obsolete patches:
(This thread is a work in progress. I'll add links here as I create a post about each patch.) This thread is intended to eventually be useful to those trying to decide whether or not to bother with patching. To avoid it becoming long and confusing for those new to patching, please don't post comments or questions about specific firmware versions here. The place to do that is in one of threads listed at the top of this page. Last edited by GeoffR; 09-01-2018 at 06:23 AM. Reason: Added link to version 4.10.11655 |
05-06-2015, 05:29 PM | #2 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Custom page refresh options
The unpatched firmware allows the page refresh interval to be set from 1 to 6 pages. It is also possible to edit the numPartialUpdatePageTurns entry in the [Reading] section of the device's configuration file to change the value to something larger than 6.
The `Custom page refresh options` patch allows the Reading Settings menu itself to be changed, so you can select from a custom set of values without the need to edit the configuration file. There are two patch alternatives: an arithmetic progression (default 1,2,3,4,5,6,7,8,9,10,11,12); or a geometric progression (default 1,2,4,8,16,32,64). The screenshots attached (Glo, 3.15.0) show the first page of the Reading Settings menu, with the Refresh menu popup activated. From left to right: 1. Unpatched. 2. Patched, alternative 1 (default). 3. Patched, alternative 2. Last edited by GeoffR; 05-07-2015 at 12:03 AM. Reason: Simplifications |
Advert | |
|
05-06-2015, 11:55 PM | #3 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Freedom to advanced fonts control
The unpatched firmware restricts the advanced 'TypeGenius' font menu (which allows adjustment of font weight and sharpness) to a subset of the built-in fonts. The `Freedom to advanced fonts control` patch removes this restriction, making it available for sideloaded fonts too.
It is possible to set the weight and sharpness for sideloaded fonts without patching by adding readingFontWeight and readingFontSharpness entries to the [Reading] section in the device's configuration file. For example, readingFontWeight\Georgia=0.8 sets the weight of the Georgia font to the maximum value selectable from the advanced menu slider. This patch allows the convenience of adjusting these settings onscreen without the need to edit the configuration file. Both OTF and TTF format fonts can be adjusted, but the adjustments might not take effect in the EPUB reader unless the font is in TTF format. In recent firmware versions this patch can no longer be used with Japanese language books or Japanese locale settings. The screenshots attached (Glo, 3.15.0) show the font options for a sideload TTF font used in a sideloaded EPUB book: 1. Unpatched, Aa menu. 2. Patched, Aa menu; note that the 'Advanced' menu is now available for this font. 3. Patched, Advanced menu, weight/sharpness increased. 4. Patched, after tapping 'Apply'. Last edited by GeoffR; 05-07-2015 at 12:23 AM. Reason: Not with Japanese language |
05-07-2015, 03:53 AM | #4 |
Guru
Posts: 733
Karma: 5797160
Join Date: Jun 2010
Location: Istanbul
Device: Kobo Libra
|
One more thing about TypeGenius. Let's say that you raised weight slider 2 steps, you can't turn the type back to the original weight and sharpness by lowering two steps. You have to edit Kobo's config file under .kobo/Kobo/Kobo eReader.conf (if you are using Linux or OS X dot before the file or folder name means the file or the folder is hidden, I have no idea if they are also hidden in Windows, never used it) and remove sharpness and weight lines for the font you want to reset.
And a recommendation, before playing with weight, you should check optical sizes and the book styles of your typeface if there are any. You also have to reboot the device after installing different forms of the same typeface. Caption usually works well with eInk with its lessened details and high x-height. Last edited by GERGE; 05-07-2015 at 03:56 AM. |
05-08-2015, 12:55 AM | #5 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Custom reading footer style
The reading footer is the area at the bottom of the screen where the page number or other progress indicator is displayed. The `Custom reading footer style` patch allows the following properties of the footer to be changed:
In general, the default values for the patch result in a footer of about half the height of the one in the unpatched firmware. The same footer is used for both the EPUB and KEPUB reader, but as the KEPUB reader has a large header matching the large original footer, the smaller patched footer will probably look too small when reading kepubs. Note that other factors in the book's stylesheet can affect the size of the gap between the text and the progress indicator: line spacing, paragraph spacing, @page margins, widows/orphans settings, and others. The screenshots attached (Glo, 3.15.0) show a sideloaded epub with the line spacing adjusted to get the text close to the footer in both cases: 1. Unpatched 2. Patched (default values for Glo) Last edited by GeoffR; 05-08-2015 at 01:01 AM. Reason: ... in both cases. |
Advert | |
|
05-10-2015, 12:36 AM | #6 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
My 15 line spacing values
The unpatched firmware allows adjustment of the line spacing via a slider with 15 positions. However most people use only the lowest few settings, as the highest settings are far too wide to be useful. The `My 15 line spacing values` patch allows the 15 stock choices to be replaced with your own 15 custom values.
The final line spacing on the page depends on a number of factors, including choice of font face, publisher's settings in the book's stylesheet, and whether the EPUB or KEPUB reader is used (see the `ePub unitless line height` patch to fix a problem affecting line spacing in the EPUB reader's stylesheet.) My understanding is that the line spacing value set by the slider is a scale factor by which the device multiplies the base line height. The scale factors used by the unpatched firmware range from 1.0 - 3.0. The default values in the patch change this range to 0.7 - 1.1, but you can choose any custom range you want. The screenshots below (Glo, 3.15.0) show 5 out of the 15 line spacing settings with a sideloaded epub using the Amasis font. From left to right, line spacing values are: 0.7, 0.8, 0.9, 1.0 (unpatched minimum), 1.1: And if you are wondering why anyone would need a line spacing value as small as 0.7, it is because some fonts come with an extremely large base line height: the screenshots below (Glo, 3.15.0) show an EPUB with the Kobo Nickel font selected, line spacing values of 0.7 (default patch minimum) and 1.0 (unpatched minimum): Beware that the KEPUB reader has a limitation which affects the use of small line spacing values. The screenshots below (Glo 3.15.0) show pages of an EPUB and a KEPUB respectively, using a line spacing value of 0.8. Note the dots at the bottom of the KEPUB page: these are the ascenders of the top line of text from the following page. How narrow you can make the KEPUB line spacing before this problem shows up depends on which font face is used. There is currently no fix for this problem, other than increasing the line spacing or switching to the EPUB reader. Last edited by GeoffR; 05-10-2015 at 06:57 AM. Reason: And if you are wondering ... |
05-10-2015, 09:24 AM | #7 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Very,very clear this !
|
05-11-2015, 01:09 AM | #8 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
ePub unitless line height
(This patch is available for firmware versions 2.8.1 - 3.15.0 but is no longer needed in current firmware as the problem described below was fixed in firmware version 3.16.0)
The Kobo firmware has separate built-in stylesheets for the EPUB and KEPUB readers where the default line height is set. There is a long-standing fault in the EPUB stylesheet which causes the line height to be set in proportion to the font size set from the font size slider, instead of in proportion to the final font size on the page as is done in the KEPUB reader. The `ePub unitless line height` patch fixes this fault. (This problem might not be very noticable in books which don't use a wide range of font sizes, or where headings don't span multiple lines, or where the publisher forces a fixed line height instead of using the default set by the reader.) The screenshots below (Glo, 3.2.0) show a page from a demonstration epub which has three different font sizes set in the book (xx-large, medium, xx-small), with the line spacing adjusted via the slider to suit the medium font size: 1. Unpatched, 2. Patched. Last edited by GeoffR; 06-11-2015 at 09:11 AM. Reason: Patch is now obsolete, problem has been fixed in firmware 3.16.0 |
05-12-2015, 12:17 AM | #9 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Stylesheet priority patches: Reader's preferences vs. publisher's.
The firmware comes with built-in stylesheets which set the default styles for books according to the reader's preferences, and can in some cases override the styles set by the publisher in the book. There are separate stylesheets for EPUB and KEPUB books.
In an ideal world, the publisher would respect the defaults set by the device and only override those styles which shouldn't follow the reader's preference. For example, the publisher should let the reader choose the line spacing for the main body of text, and only override the reader's preference for special elements such as headings, dropcaps, etc. But in practice there are many books where the publisher overrides the default settings to force their particular choice of line spacing or other style to be used throughout the book. So when designing the built-in stylesheets, the device maker has a choice:
The main problem with the heavy-handed approach is that it overrides both the good and the bad choices made by the publisher. For example, forcing full justification might also affect some headings or images that should be centred. In general on Kobo devices the EPUB reader takes the light-handed approach (with a few exceptions), while the KEPUB reader takes the heavy-handed option (again with a few exceptions). There are a number of patches that can modify the EPUB or KEPUB built-in stylesheets to use the heavy-handed instead of light-handed approach, or vice versa: Patches to use a heavier hand:
Patches to use a lighter hand:
No amount of patching will give ideal results in all situations however, so I recommend readers take control of their reading experience by learning a bit about CSS stylesheets, removing DRM, and using tools such as Calibre to fix the publisher's bad choices at the source. Last edited by GeoffR; 10-17-2015 at 12:58 AM. Reason: Added `Un-Force user font-family in KePubs` to list |
05-19-2015, 08:41 AM | #10 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Margin patches
The following three patches can be used individually or in any combination:
1. `Custom left & right margins` The margin adjustment slider has nine settings which allow the left/right margins to be increased by a percentage of the screen width. The increase is in addition to any @page or body margin set in the book by the publisher. In the unpatched firmware the increments are 0%, 2%, 4%, 6%, 8%, 10%, 12%, 14%, 16%. At the highest setting almost one third of the screen is margin! The `Custom left & right margins` patch allows these nine values to be changed, the default patched increments are: 0%, 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%. 2. `Custom kepub default margins` The KEPUB reader has an extra default left/right margin of 20px (25px on the Glo/Aura) which is added to the margin set in the book and by the adjustment slider. The `Custom kepub default margins`patch allows the size of this default margin to be changed. The default patched value is 5px. The following screenshots (Glo, 3.15.0) show a synced KePub with the margin adjustment slider set to minimum: 1. Normal reading mode, without patch. 2. Normal reading mode, patched. 3. Full-screen reading mode, without patch 4. Full-screen reading mode, patched. (Note that all screenshots are with the `Fix kepub side bearing font cut-off bug` patch applied, which makes the left/right margins an extra 0.2em larger.) 3. `ePub fixed/adjustable top/bottom margins` (Note that in some firmware versions there were separate `ePub fixed top/bottom margins` and `ePub adjustable top/bottom margins` patches.) This patch modifies the built-in EPUB stylesheet to set the top and bottom @page margins to either a fixed number of pixels, or to a variable size depending on the position of the margin adjustment slider. The left/right @page margins are set to zero. The margins set by this patch override the @page margins set in the book by the publisher. The patch has three options, which can be changed independently: 1. Choose the top margin to be adjustable, or set a fixed size in px. 2. Choose the bottom margin to be adjustable, or set a fixed size in px. 3. Choose the adjustment multiple, a size in px that the adjustable top/bottom margins change by for each percent of screen width of the left/right margins set by the adjustment slider. In full-screen reading mode the KEPUB reader sets the top/bottom margins to be equal to the left/right margin, so when you move the adjustment slider all four margins change. The adjustable top/bottom option of the `ePub fixed/adjustable top/bottom margins` patch adds a similar feature to the EPUB reader. However, unlike the KEPUB reader, the patch affects epubs in both normal and full-screen reading modes. The images below are each a composite of nine screenshots showing a rectangle drawn to the maximum size available at each position of the margin slider: 1. Normal reading mode, default patch settings (adjustment multiple = 6px.) 2. Full-screen reading mode, adjustment multiple = 7px. These screenshots were taken from the first page of this test book: margintest.epub on my Glo with firmware 3.15.0 and the `Custom reading footer style`, `Custom left & right margins` patches (with default patch settings) in addition to the `ePub fixed/adjustable top/bottom margins` patch. Getting the most out of this patch might take a bit of trial and error, as the best choice of adjustment multiple depends not only on device type but on whether you use normal or full-screen reading mode. In full-screen mode the adjustment multiple should be about 1% of the screen width (6px for Touch/Mini, 7-8px for Glo/Aura, 10-11px for AuraHD/H2O/GloHD), assuming there is no left/right body margin set in the book. But in normal reading mode, because of the footer and small built-in top margin, it is impossible to get a value for the adjustment multiple that results in the top/bottom margin being proportional to the left/right at all slider settings unless a body margin is added to the book (which then messes with the proportionality in full-screen reading mode.) A value slightly less than 1% should give reasonable results except at the lowest slider positions. Last edited by GeoffR; 05-19-2015 at 12:05 PM. Reason: Use the term 'adjustment multiple' to refer to the amount the adjustable top/bottom margins increase by. |
05-21-2015, 04:49 AM | #11 |
Librarian
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
Hi !
For this last one, can i enable the patch to have a adjustable top margin and add a body bottom-padding in the kobo_extra.css to enable it again ? # Note that this patch has the side-effect of removing the body bottom padding # from the built-in stylesheet, which means that there will no longer be a line # of padding added automatically at the end of chapters. Then, if I understand correctly, if I just want the top margin to be adjustable, I have to leave the top-margin line ( #replace_string = B82BBE, `%\01`, `2\05`) commented and uncomment the bottom-margin one and set it to 0px ? |
05-21-2015, 09:12 AM | #12 | ||
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Quote:
|
||
05-21-2015, 09:59 AM | #13 |
Librarian
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
Ok, but if I leave it à 0px, the classic footer large footer will stay untouched, no ? (I want the footer to stay as it is in the default config)
Last edited by cramoisi; 05-21-2015 at 10:04 AM. |
05-31-2015, 06:51 PM | #14 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
KePub/ePub fixed font sharpness
Glyphs are drawn on the screen using an anti-aliasing technique that can make curves and diagonal lines look smooth, avoiding the jagged look caused by the individual pixels. This is acheived by adding shaded pixels to the glyph to give the illusion of partial pixels, but this also reduces the perceived sharpness of the glyph. Therefore, for a given pixel size, increased sharpness is gained only by a reduction in smoothness, and vice versa.
The TypeGenius feature allows the weight and sharpness of each font to be adjusted. (See the `Freedom to advanced font controls` patch to enable TypeGenius for sideloaded fonts.) Adjustng the sharpness allows the ideal balance of smoothness vs sharpness to suit individual preferences. The table in the following screenshots (Glo 3.15.0) shows the range of weight and sharpness values that can be set from the slider. This is only a sample of the possible values, the slider actually allows much finer adjustment. (These screenshots were created from this demonstration kepub using the built-in Georgia and sideloaded Tex Gyre Bonum fonts, and are best viewed at 100% zoom to see the increase in sharpness from left to right): In firmware versions up to 3.1.1 the advanced fonts menu had separate sliders for weight and sharpness which allowed any combination of values to be selected. But from firmware version 3.2.0 there is only one slider which sets both weight and sharpness, so an increase in weight results in an increase in sharpness too. In effect this means only the combination of values along a diagonal from the lower left to upper right of the above table can be selected. The `ePub fixed font sharpness` and `KePub fixed font sharpness` patches allow a fixed sharpness value to be chosen, e.g. 0.0, 0.1, or 0.2, so that the sharpness value selected by the adjustment slider is ignored and only the weight value used. In effect this means that the slider can be used to select combinations from a vertical column instead of from the diagonal of the table above. It is also possible to set the weight and sharpness independently without patching by editing the device's configuration file and changing the values of readingFontWeight and readingFontSharpness in the [Reading] section. While these patches only allow one fixed sharpness value to be selected, they avoid the need to re-edit the configuaation file after adjusting the weight via the slider. Last edited by GeoffR; 05-31-2015 at 07:48 PM. Reason: spelling |
06-06-2015, 09:48 PM | #15 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Enabling undocumented features
The kobo firmware has some undocumented or experimental features that are not active by default, but which can be enabled in the [FeatureSettings] section of the device's configuration file .kobo/Kobo/Kobo eReader.conf.
The configuration file is a plain ASCII file with unix line breaks. When editing it, it is important to use an editor that doesn't change the file type or line break style. Most Linux and Mac text editors should be okay, but don't use Notepad or Wordpad in Windows: use an editor such as Notepad++ instead. (Enabling these features doesn't require patching at all, but some patches work in conjunction with undocumented features, so I've included this post here for reference.) An example of an undocumented feature is FullScreenReading which, once enabled, adds the following option to the Reading settings menu: To enable a feature, e.g. FullScreenReading, edit the configuration file and add the new feature to the [FeatureSettings] section. (If there is not already a [FeatureSettings] section, then add that too.) The result should look like: Code:
[FeatureSettings] FullScreenReading=true Last edited by GeoffR; 06-07-2015 at 12:10 AM. Reason: spelling |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unofficial Sigil patches | varlog | Sigil | 8 | 11-12-2014 06:14 PM |
Index: Making a linked index in epub | virtual_ink | ePub | 21 | 10-19-2011 11:23 PM |
DR800 Long time to index files after upgrading firmware? | Albyr | iRex | 29 | 06-18-2011 05:23 PM |
How to apply the enhancements/patches ? | nubbol | Calibre | 2 | 09-04-2010 11:42 PM |
iLiad Applying DR GTK+ patches to iLiad | ericshliao | iRex Developer's Corner | 16 | 03-14-2010 05:39 AM |