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

Increase gamma values range #122

Merged
merged 4 commits into from Mar 10, 2018

Conversation

Projects
None yet
2 participants
@poire-z
Contributor

poire-z commented Mar 10, 2018

Taken from sergeyvl (pbchess) recent coolreader modifications to upstream:
https://gitlab.com/koreader/crengine-sergeyvl-mirror/commit/e27584d7d889088caab4b9dd683d90965dba3601
https://gitlab.com/koreader/crengine-sergeyvl-mirror/commit/4a2df8677a8d67d0e48fead278204b3e97d2cc55
https://gitlab.com/koreader/crengine-sergeyvl-mirror/commit/cc6c7bccd8b88306afa137cf34e75c7fc1e464f8

(with just a slight correction to generated comments: 15is still the no modification value, and not GAMMA_LEVELS/2).

Increase gamma values range from originally:
gamma values: 0.3 -> 1.9 - indexes: 0 -> 30
to:
gamma values: 0.3 -> 15.0 - indexes: 0 -> 56
The first 0-30 indexes still map to the original gamma values, and index 15 is still gamma value 1.0 (no gamma change).

No change needed to base or frontend, and no impact to current gamma values.
In defaults.lua, we have:

-- crereader font gamma
DCREREADER_CONFIG_LIGHTER_FONT_GAMMA = 10
DCREREADER_CONFIG_DEFAULT_FONT_GAMMA = 15
DCREREADER_CONFIG_DARKER_FONT_GAMMA = 25

which are index values.
So one can change them to up to 56 to try darker gamma.
(Darker gamma are a bit ugly on the emulator, I'm curious about how they will look on our devices).

@Frenzie

This comment has been minimized.

Show comment
Hide comment
@Frenzie

Frenzie Mar 10, 2018

Member

Oh, I was going to cherry-pick those. :-)

Member

Frenzie commented Mar 10, 2018

Oh, I was going to cherry-pick those. :-)

@poire-z

This comment has been minimized.

Show comment
Hide comment
@poire-z

poire-z Mar 10, 2018

Contributor

If you prefer to cherry pick these (dunno how that works) so they appear as authored by sergeyvl (dunno if that works for remote authors), feel free to do it instead - I'll close this PR with no problem :)

Contributor

poire-z commented Mar 10, 2018

If you prefer to cherry pick these (dunno how that works) so they appear as authored by sergeyvl (dunno if that works for remote authors), feel free to do it instead - I'll close this PR with no problem :)

@Frenzie

This comment has been minimized.

Show comment
Hide comment
@Frenzie

Frenzie Mar 10, 2018

Member

You git cherry-pick by putting them in the same git repo. Something like

git checkout -b sergey
git reset HEAD~200 # common past
git pull https://sergey
# and now…
git checkout master
git checkout -b sergey-cherries
git cherry-pick hash
Member

Frenzie commented Mar 10, 2018

You git cherry-pick by putting them in the same git repo. Something like

git checkout -b sergey
git reset HEAD~200 # common past
git pull https://sergey
# and now…
git checkout master
git checkout -b sergey-cherries
git cherry-pick hash

Sergey Vlasov and others added some commits Mar 25, 2016

Increase gamma values range
Cherry-picked 3 commits from sergeyvl recent coolreader modifications
to upstream
Increase gamma values range from originally:
  gamma values: 0.3 ->  1.9 - indexes: 0 -> 30
to:
  gamma values: 0.3 -> 15.0 - indexes: 0 -> 56
The first 0-30 indexes still map to the original gamma values,
and index 15 is still gamma value 1.0 (no gamma change).
@poire-z

This comment has been minimized.

Show comment
Hide comment
@poire-z

poire-z Mar 10, 2018

Contributor

Thanks for the easy procedure :) Hope I applied it well.

Contributor

poire-z commented Mar 10, 2018

Thanks for the easy procedure :) Hope I applied it well.

@Frenzie

This comment has been minimized.

Show comment
Hide comment
@Frenzie

Frenzie Mar 10, 2018

Member

Yup, looks good. I like the preserved history. :-)

Edit: of course that means either rebase or merge commit, no squash, or it'll be lost. :-P

Member

Frenzie commented Mar 10, 2018

Yup, looks good. I like the preserved history. :-)

Edit: of course that means either rebase or merge commit, no squash, or it'll be lost. :-P

@poire-z poire-z merged commit a1b3781 into koreader:master Mar 10, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@poire-z poire-z deleted the poire-z:increase_gamma_range branch Mar 10, 2018

@Frenzie Frenzie referenced this pull request Aug 4, 2018

Closed

Harfbuzz #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment