Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support not embedding glyphs in svg mathtests.#22881

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 1 commit intomatplotlib:mainfromanntzer:mathtextsvgtests
Jun 12, 2022

Conversation

anntzer
Copy link
Contributor

PR Summary

Redo of#19201 (decrease size of mathtext svg baselines, by switching to embedding text as text, not as paths), but without removing the other formats or restricting fonts. Suggested as a preliminary to#22852 (which would just need to move the affected tests to the newsvgastext_math_tests list.

Intentionally contains an example test in a second commit, which is reverted by the third commit: checkout the second commit to test locally. I will remove these two commits from history (and hence get rid of the "unclean PR" lint) if this PR gets approved.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

This reverts commitce14a1b.

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

I guess I'm no clear on this - how do we normally embed fonts in SVGs? If as shapes, then shouldn't we test that?

@anntzer
Copy link
ContributorAuthor

As paths, but all the existing mathtext tests already test that. The point is not to convert the old tests to embed-as-glyphs (which would indeed affect the testing of the embed-as-shape path), but to make the new ones use the embed-as-glyphs codepath. If we ever get to a point where all the old tests have been removed (seems unlikely), we can always rediscuss how to restore some embed-as-paths tests.

@jklymak
Copy link
Member

OK, but I don't understand the motivation, other than a moderate optimization of the repo size. If we embed paths, that seems to be what we should test, even for new tests.

@timhoffm
Copy link
Member

I think most of the time,we're not interested in testing the shape of the glyph path (and the algorithm of that). This glyph should be in that position is enough, and potentially more stable. If the path generation changes all tests would be broken even when the are testing primarily other aspects.

anntzer reacted with thumbs up emoji

@anntzer
Copy link
ContributorAuthor

anntzer commentedJun 11, 2022
edited
Loading

@jklymak Are you happy with the explanation given by@timhoffm (which I agree with) and willing to merge this? (If you approve this, I will squash out the second and third commits, which are making the pr_clean check fail -- see top message.)

@timhoffm
Copy link
Member

Can self-merge after squashing.

@anntzer
Copy link
ContributorAuthor

squashed

@oscargusoscargus merged commit10b26c9 intomatplotlib:mainJun 12, 2022
@anntzeranntzer deleted the mathtextsvgtests branchJune 12, 2022 09:46
@QuLogicQuLogic added this to thev3.6.0 milestoneJun 15, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak left review comments

@timhoffmtimhoffmtimhoffm approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

5 participants
@anntzer@jklymak@timhoffm@oscargus@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp