Skip to content

Better document the semantics of get_text_width_height_descent. - #26028

Merged
oscargus merged 1 commit into
matplotlib:mainfrom
anntzer:gtwhd
Jun 1, 2023
Merged

oscargus merged 1 commit into
matplotlib:mainfrom
anntzer:gtwhd

Conversation

@anntzer

@anntzer anntzer commented Jun 1, 2023

Copy link
Copy Markdown
Contributor

Including whitespace seems to be the current behavior for agg and makes right-alignment works as it does. It is also necessary to make e.g. the currently PR'ed rainbow_text (based on annotation(..., xycoords=textobj) implementation work.

Documenting the behavior is in particular useful for third-party backend implementers (mplcairo got this wrong previously).

PR summary

PR checklist

Including whitespace seems to be the current behavior for agg and makes
right-alignment works as it does.  It is also necessary to make e.g. the
currently PR'ed rainbow_text (based on `annotation(..., xycoords=textobj)`
implementation work.

Documenting the behavior is in particular useful for third-party backend
implementers (mplcairo got this wrong previously).
@timhoffm timhoffm added this to the v3.8.0 milestone Jun 1, 2023
@timhoffm

timhoffm commented Jun 1, 2023

Copy link
Copy Markdown
Member

Anybody can merge after CI pass.

@oscargus
oscargus merged commit b200f02 into matplotlib:main Jun 1, 2023
@anntzer
anntzer deleted the gtwhd branch June 1, 2023 11:30
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