Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support standard names for freetype hinting flags. #17380

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

Merged
merged 1 commit into from
May 11, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 11, 2020

We have a custom mapping of FreeType hinting flags (FT_LOAD_DEFAULT,
FT_LOAD_NO_AUTOHINT, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_HINTING) to our
own string names ("either", "native", "auto", "default") which is
basically not documented anywhere and makes searching the docs tricky,
even when one knows where to look for FreeType flags. Add support for
synonyms which map directly to the standard flag names ("default",
"no_autohint", "force_autohint", "no_hinting") which should at least
make the correspondence more transparent.

There's not much benefit in killing the old synonyms, so I left them in
place.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.3.0 milestone May 11, 2020
We have a custom mapping of FreeType hinting flags (FT_LOAD_DEFAULT,
FT_LOAD_NO_AUTOHINT, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_HINTING) to our
own string names ("either", "native", "auto", "default") which is
basically not documented anywhere and makes searching the docs tricky,
*even* when one knows where to look for FreeType flags.  Add support for
synonyms which map directly to the standard flag names ("default",
"no_autohint", "force_autohint", "no_hinting") which should at least
make the correspondence more transparent.

There's not much benefit in killing the old synonyms, so I left them in
place.
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though we continue to support the old values, IMHO we should recommend the new values instead of having just equivalent synonyms.

@anntzer
Copy link
Contributor Author

anntzer commented May 11, 2020

I think that's what the PR does? :)

@QuLogic QuLogic merged commit f792c8b into matplotlib:master May 11, 2020
@anntzer anntzer deleted the ftflags branch May 11, 2020 23:53
@timhoffm
Copy link
Member

@anntzer As I read the description, it does not indicate a preference for the new values (which IMHO it should).

@anntzer
Copy link
Contributor Author

anntzer commented May 12, 2020

Feel free to pr a rewording :)

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

Successfully merging this pull request may close these issues.

3 participants