Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kepub constant font sharpness #116

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ ePub constant font sharpness:
- FindBaseAddressString: "\0\0 -kobo-font-sharpness: %1;"
- ReplaceString: {Offset: 3, Find: "-kobo-font-sharpness: %1", Replace: "-kobo-font-sharpness:0.2", MustMatchLength: yes}

# MISSING: KePub constant font sharpness (not enough room for neutralizing the QString arg; we will probably need to patch that one out)
# For KePub constant font sharpness, see another patch below.

Un-Force user text-align in div,p tags in KePubs:
- Enabled: no
Expand Down
28 changes: 28 additions & 0 deletions src/versions/4.34.20097/libnickel.so.1.0.0.yaml/superjeng1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The following patch(es) were made by superjeng1

KePub constant font sharpness (Font anti-aliasing):
- Enabled: no
- Description: |
With this patch the KePub reader will use a constant sharpness value of 0.2,
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.
Despite the slider range, the value set by this patch could go past the range,
however large values may start to break the font apart, feel free to fine tune
this value. The sharpness actually refers to how much anti-aliasing Kobo would
use, less anti-aliasing would make the font appear sharper, but the curvatures
of the font would appear jagged. So tuning this value *down* (Use *more* anti-
aliasing) makes sense, but this doesn't work indefinitely as the system would
start to just add blur instead of doing anything.
# body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; text-rendering: %3; }\n
# --> body{-kobo-font-sharpness: 0.00/*%1*/;-kobo-font-thickness:%2;text-rendering:%3}\n
- FindReplaceString:
Find: "body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; text-rendering: %3; }\n"
Replace: "body{-kobo-font-sharpness: 0.00/*%1*/;-kobo-font-thickness:%2;text-rendering:%3}\n"
MustMatchLength: yes
- ReplaceString:
Offset: 5
Find: "-kobo-font-sharpness: 0.00"
Replace: "-kobo-font-sharpness: 0.20" # Replace 0.20 with desired value
# Example of a negative value
# Replace: "-kobo-font-sharpness:-0.20"
MustMatchLength: yes
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ ePub constant font sharpness:
- FindBaseAddressString: "\0\0 -kobo-font-sharpness: %1;"
- ReplaceString: {Offset: 3, Find: "-kobo-font-sharpness: %1", Replace: "-kobo-font-sharpness:0.2", MustMatchLength: yes}

# MISSING: KePub constant font sharpness (not enough room for neutralizing the QString arg; we will probably need to patch that one out)
# For KePub constant font sharpness, see another patch below.

Un-Force user text-align in div,p tags in KePubs:
- Enabled: no
Expand Down
28 changes: 28 additions & 0 deletions src/versions/4.35.20400/libnickel.so.1.0.0.yaml/superjeng1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The following patch(es) were made by superjeng1

KePub constant font sharpness (Font anti-aliasing):
- Enabled: no
- Description: |
With this patch the KePub reader will use a constant sharpness value of 0.2,
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.
Despite the slider range, the value set by this patch could go past the range,
however large values may start to break the font apart, feel free to fine tune
this value. The sharpness actually refers to how much anti-aliasing Kobo would
use, less anti-aliasing would make the font appear sharper, but the curvatures
of the font would appear jagged. So tuning this value *down* (Use *more* anti-
aliasing) makes sense, but this doesn't work indefinitely as the system would
start to just add blur instead of doing anything.
# body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; text-rendering: %3; }\n
# --> body{-kobo-font-sharpness: 0.00/*%1*/;-kobo-font-thickness:%2;text-rendering:%3}\n
- FindReplaceString:
Find: "body { -kobo-font-sharpness: %1; -kobo-font-thickness: %2; text-rendering: %3; }\n"
Replace: "body{-kobo-font-sharpness: 0.00/*%1*/;-kobo-font-thickness:%2;text-rendering:%3}\n"
MustMatchLength: yes
- ReplaceString:
Offset: 5
Find: "-kobo-font-sharpness: 0.00"
Replace: "-kobo-font-sharpness: 0.20" # Replace 0.20 with desired value
# Example of a negative value
# Replace: "-kobo-font-sharpness:-0.20"
MustMatchLength: yes