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

Skip to content

Simplify generate_fontconfig_pattern. #24303

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
Nov 1, 2022
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 29, 2022

  • Switch _family_escape, _value_escape to be more similar to _family_unescape, _value_unescape.
  • generate_fontconfig_pattern doesn't need to go through the generic escape_val, but instead rely on the fact that prop.get_family() always returns a list whereas the other getters always return a scalar value, and directly do the escaping and joining as needed.

PR Summary

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

- Switch _family_escape, _value_escape to be more similar to
  _family_escape, _value_escape.
- generate_fontconfig_pattern doesn't need to go through the generic
  escape_val, but instead rely on the fact that prop.get_family() always
  returns a list whereas the other getters always return a scalar value,
  and directly do the escaping and joining as needed.
@QuLogic
Copy link
Member

QuLogic commented Nov 1, 2022

Switch _family_escape, _value_escape to be more similar to _family_escape, _value_escape.

Did I miss something, or do these not both say the same thing?

@anntzer
Copy link
Contributor Author

anntzer commented Nov 1, 2022

Sorry, that should have been

more similar to _family_unescape, _value_unescape.

Edited both the top post and the commit message accordingly.

@oscargus oscargus added this to the v3.7.0 milestone Nov 1, 2022
@oscargus
Copy link
Member

oscargus commented Nov 1, 2022

I take it that @QuLogic 's comment has been taken care of.

@oscargus oscargus merged commit 79a5abb into matplotlib:main Nov 1, 2022
@anntzer anntzer deleted the gfp branch November 1, 2022 10:10
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.

4 participants