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

Skip to content

[ENH]: Add get/set_antialiased to Text objects #25675

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

Closed
anntzer opened this issue Apr 13, 2023 · 3 comments · Fixed by #25775
Closed

[ENH]: Add get/set_antialiased to Text objects #25675

anntzer opened this issue Apr 13, 2023 · 3 comments · Fixed by #25775
Labels
API: consistency Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Good first issue Open a pull request against these issues if there are no active ones! New feature topic: text
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Apr 13, 2023

Problem

Currently, Text objects always retrieve their antialiasing state via the global rcParams["text.antialias"], unlike other artists for which this can be configured on a per-artist basis via set_antialiased (and read via set_antialiased).

Proposed solution

Add similar getters/setters on Text objects (also adjusting Annotations accordingly, if needed) and use that info in the drawing stage.

Should be relatively easy to implement, except that the slight fiddling needed with backends requires some understanding of backend code (I think we need to replace the access to rcParams["text.antialiased"] by going through the GraphicsContext state).

@anntzer anntzer added New feature topic: text API: consistency Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Good first issue Open a pull request against these issues if there are no active ones! labels Apr 13, 2023
@ANSHTYAGI7
Copy link

i would like to work on this issue .Please assign me this issue

@rcomer
Copy link
Member

rcomer commented Apr 14, 2023

@ANSHTYAGI7 you are welcome to work on this issue, but we do not assign them.

@stevezhang1999
Copy link
Contributor

Based on my understanding, I found currently only AGG and Cairo backends support customizing font antialiasing. So we are going to add support for these two?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: consistency Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Good first issue Open a pull request against these issues if there are no active ones! New feature topic: text
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants