View Single Post
Old 02-03-2016, 11:13 PM   #98
andrego
Junior Member
andrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheeseandrego can extract oil from cheese
 
Posts: 5
Karma: 1000
Join Date: Feb 2016
Device: Kobo H20
Edit: these patches are for 3.19.5761.

The following patches can be used to replace system fonts with others of your choosing - meaning that they will have the 'Advanced Font Control' available.

This is a 'safe' way to gain access to advanced font control for a limited number of fonts, since the 'Freedom to advanced font control' patch is untested/may cause issues if used with Japanese content or if the language set to Japanese.

Some fonts are defined in libnickel.so.1.0.0 but are not actually included in recent firmware versions. In this case, you lose nothing by replacing them, and gain advanced font control for free!

To use, copy the patch to the "libnickel.so.1.0.0.patch" file, update it with your font name, apply as usual, and side-load your font the usual way: copy to the "Fonts" directory on your device.

Note 1: For fonts that are shipped, they can still be side-loaded, but you will lose advanced font control. (Note: even when replaced, the original system font will still be hidden if you apply the patch to hide system fonts.)

Note 2: I have not provided patches for Georgia or Avenir, nor have I provided them for Ryumin, Gothic (or their recent replacements). The former are default fonts and I have not tested whether they are safe to replace. The latter are not treated in the same way as other system fonts and I am unsure what the effects of replacing them would be.

Caecilia:
Quote:
<Patch>
patch_name = `Replace system font: Caecilia`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
replace_string = B8D39C, `C`, ``
replace_string = B8D39E, `a`, ``
replace_string = B8D3A0, `e`, ``
replace_string = B8D3A2, `c`, ``
replace_string = B8D3A4, `i`, ``
replace_string = B8D3A6, `l`, ``
replace_string = B8D3A8, `i`, ``
replace_string = B8D3AA, `a`, ``
</Patch>
Amasis:
Quote:
<Patch>
patch_name = `Replace system font: Amasis`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
replace_string = B8D344, `A`, ``
replace_string = B8D346, `m`, ``
replace_string = B8D348, `a`, ``
replace_string = B8D34A, `s`, ``
replace_string = B8D34C, `i`, ``
replace_string = B8D34E, `s`, ``
</Patch>
Delima:
Quote:
<Patch>
patch_name = `Replace unused system font: Delima`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
# This font is not used in this firmware version so
# nothing is lost by replacing it.
#
replace_string = B8D3C0, `D`, ``
replace_string = B8D3C2, `e`, ``
replace_string = B8D3C4, `l`, ``
replace_string = B8D3C6, `i`, ``
replace_string = B8D3C8, `m`, ``
replace_string = B8D3CA, `a`, ``
</Patch>
Felbridge:
Quote:
<Patch>
patch_name = `Replace unused system font: Felbridge`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
# This font is not used in this firmware version so
# nothing is lost by replacing it.
#
replace_string = B8D3E0, `F`, ``
replace_string = B8D3E2, `e`, ``
replace_string = B8D3E4, `l`, ``
replace_string = B8D3E6, `b`, ``
replace_string = B8D3E8, `r`, ``
replace_string = B8D3EA, `i`, ``
replace_string = B8D3EC, `d`, ``
replace_string = B8D3EE, `g`, ``
replace_string = B8D3F0, `e`, ``
</Patch>
Gill Sans:
Quote:
<Patch>
patch_name = `Replace unused system font: Gill Sans`
patch_enable = `no`
#
# Insert replacement values for your font name below.
# Replacement does not need to contain spaces but
# it must be the same number of characters in length.
#
replace_string = B8D424, `G`, ``
replace_string = B8D426, `i`, ``
replace_string = B8D428, `l`, ``
replace_string = B8D42A, `l`, ``
replace_string = B8D42C, ` `, ``
replace_string = B8D42E, `S`, ``
replace_string = B8D430, `a`, ``
replace_string = B8D432, `n`, ``
replace_string = B8D434, `s`, ``
</Patch>
Kobo Nickel:
Quote:
<Patch>
patch_name = `Replace unused system font: Kobo Nickel`
patch_enable = `no`
#
# Insert replacement values for your font name below.
# Replacement does not need to contain spaces but
# it must be the same number of characters in length.
#
replace_string = B8D448, `K`, ``
replace_string = B8D44A, `o`, ``
replace_string = B8D44C, `b`, ``
replace_string = B8D44E, `o`, ``
replace_string = B8D450, ` `, ``
replace_string = B8D452, `N`, ``
replace_string = B8D454, `i`, ``
replace_string = B8D456, `c`, ``
replace_string = B8D458, `k`, ``
replace_string = B8D45A, `e`, ``
replace_string = B8D45C, `l`, ``
</Patch>
Malabar:
Quote:
<Patch>
patch_name = `Replace unused system font: Malabar`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
replace_string = B8D470, `M`, ``
replace_string = B8D472, `a`, ``
replace_string = B8D474, `l`, ``
replace_string = B8D476, `a`, ``
replace_string = B8D478, `b`, ``
replace_string = B8D47A, `a`, ``
replace_string = B8D47C, `r`, ``
</Patch>
Rockwell:
Quote:
<Patch>
patch_name = `Replace unused system font: Rockwell`
patch_enable = `no`
#
# Insert replacement values to match your font below.
#
# This font is not used in this firmware version so
# nothing is lost by replacing it.
#
replace_string = B8D490, `R`, ``
replace_string = B8D492, `o`, ``
replace_string = B8D494, `c`, ``
replace_string = B8D496, `k`, ``
replace_string = B8D498, `w`, ``
replace_string = B8D49A, `e`, ``
replace_string = B8D49C, `l`, ``
replace_string = B8D49E, `l`, ``
</Patch>
Times New Roman:
Quote:
<Patch>
patch_name = `Replace unused system font: Times New Roman`
patch_enable = `no`
#
# Insert replacement values for your font name below.
# Replacement does not need to contain spaces but
# it must be the same number of characters in length.
#
replace_string = B8D4B4, `T`, ``
replace_string = B8D4B6, `i`, ``
replace_string = B8D4B8, `m`, ``
replace_string = B8D4BA, `e`, ``
replace_string = B8D4BC, `s`, ``
replace_string = B8D4BE, ` `, ``
replace_string = B8D4C0, `N`, ``
replace_string = B8D4C2, `e`, ``
replace_string = B8D4C4, `w`, ``
replace_string = B8D4C6, ` `, ``
replace_string = B8D4C8, `R`, ``
replace_string = B8D4CA, `o`, ``
replace_string = B8D4CC, `m`, ``
replace_string = B8D4CE, `a`, ``
replace_string = B8D4D0, `n`, ``
</Patch>

Last edited by andrego; 02-03-2016 at 11:18 PM.
andrego is offline   Reply With Quote