-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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?
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. |
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. |
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. |
6478015
to
681e264
Compare
Can self-merge after squashing. |
squashed |
681e264
to
7402350
Compare
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 new
svgastext_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
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).This reverts commit ce14a1b.