Skip to content

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

Closed

Description

@anntzer

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).

Activity

  1. added
    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …
    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Apr 13, 2023
  2. ANSHTYAGI7 commented on Apr 14, 2023

    @ANSHTYAGI7

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

  3. rcomer commented on Apr 14, 2023

    @rcomer
    Member

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

  4. added this to the v3.8.0 milestone on Apr 14, 2023
  5. stevezhang1999 commented on Apr 26, 2023

    @stevezhang1999
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featuretopic: text🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions