View Single Post
Old 12-26-2014, 11:21 PM   #96
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
`ePub fixed font sharpness` and `KePub fixed font sharpness` patches

These two patches can be applied individually or both together, and have the following effect on epub and/or kepub books:

The font sharpness value set by the weight/sharpness slider on the advanced font menu is ignored when setting the font sharpness for the book, and the fixed sharpness value set by the patch is used instead. This means the slider now only sets the font weight, and sharpness is set by the patch.

The sharpness values set by the slider range from -0.4 to 0.2 (default is -0.0666). The patch can be used to set one of three fixed values: 0.0, 0.1, or 0.2. (0.2 is maximum sharpness.)

The sharpness set by the slider is still shown in the preview window and recorded in the .conf file, it is only when viewed on the book page that the patch value is used. I haven't tested this much, I actually find it a bit difficult to tell the difference between normal sharpness and maximum sharpness, so let me know if you think you are getting a different result than when setting the sharpness manually in the .conf file.

Spoiler:
Code:
<Patch>
patch_name = `ePub fixed font sharpness`
patch_enable = `yes`
#
# This patch causes a fixed value for font sharpness to be used in epub books,
# instead of the value set by the advanced font sharpness/weight slider. The
# slider sharpness values range from -0.4(min.) to 0.2(max.), default -0.0666.
# This patch allows one of three fixed values: 0.0, 0.1, or 0.2.
#
replace_string = C99C10, `\x20\x00%\x001\x00`, `0\x00.\x000\x00`
#
# Replacement sharpness value: `0` = 0.0, `1` = 0.1, `2` = 0.2.
#
replace_string = C99C14, `0`, `2`
</Patch>


<Patch>
patch_name = `KePub fixed font sharpness`
patch_enable = `yes`
#
# This patch causes a fixed value for font sharpness to be used in kepub books,
# instead of the value set by the advanced font sharpness/weight slider. The
# slider sharpness values range from -0.4(min.) to 0.2(max.), default -0.0666.
# This patch allows one of three fixed values: 0.0, 0.1, or 0.2.
#
#     body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; }\n
# --> body{-kobo-font-sharpness:0.0/*%1*/;-kobo-font-thickness:%2}\n
replace_string = DB41F0, `b\x00o\x00d\x00y\x00 \x00{\x00 \x00-\x00k\x00o\x00b\x00o\x00-\x00f\x00o\x00n\x00t\x00-\x00s\x00h\x00a\x00r\x00p\x00n\x00e\x00s\x00s\x00:\x00 \x00%\x001\x00;\x00 \x00-\x00k\x00o\x00b\x00o\x00-\x00f\x00o\x00n\x00t\x00-\x00t\x00h\x00i\x00c\x00k\x00n\x00e\x00s\x00s\x00:\x00 \x00%\x002\x00;\x00 \x00}\x00\n\x00`, `b\x00o\x00d\x00y\x00{\x00-\x00k\x00o\x00b\x00o\x00-\x00f\x00o\x00n\x00t\x00-\x00s\x00h\x00a\x00r\x00p\x00n\x00e\x00s\x00s\x00:\x000\x00.\x000\x00/\x00*\x00%\x001\x00*\x00/\x00;\x00-\x00k\x00o\x00b\x00o\x00-\x00f\x00o\x00n\x00t\x00-\x00t\x00h\x00i\x00c\x00k\x00n\x00e\x00s\x00s\x00:\x00%\x002\x00}\x00\n\x00`
#
# Replacement sharpness value: `0` = 0.0, `1` = 0.1, `2` = 0.2.
#
replace_string = DB4228, `0`, `2`
</Patch>

Last edited by GeoffR; 12-26-2014 at 11:25 PM.
GeoffR is offline   Reply With Quote