-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Create tiny mathtext baseline images using svg with non-embedded fonts. #19201
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
84adc51
to
78df724
Compare
Generally 👍 on the concept. Questions:
|
I agree pngs would be simpler, but... Checking all fonts is likely mostly relevant for test_mathfont_rendering only, I guess? |
78df724
to
e395766
Compare
OK, so only removing SVG and PS wouldn't gain us much because PNG uses the most space anyway. I'm very hesitant to use optipng for testing. First that'd make it a hard dependency for testing. And second more importantly, we'd bake the compression algorithm into our tests. If optipng changes somehow it could break all our tests. It likely has to be SVG if we want to save space. |
If the |
This replaces e.g. `"font-family:DejaVu Sans;font-size:12px;font-style:book;font-weight:book;"` by `"font: 400 12px 'DejaVu Sans'"`. Note that the previous font weight was plain wrong...
e395766
to
f9cea50
Compare
Done. |
Conclusion from the dev call today:
|
I don't have hard numbers right now but IIRC embedding the paths makes the SVGs much larger, defeating the purpose of the PR... in that case we may just as well stick to png only for ease of use. |
You're right. The existing svgs under
|
milestoning as 3.4 as a dependency for #18916 |
Aren't we doing #19261 instead? |
Yup, milestoned the wrong one :p |
... and using non-integer bases sqrt as example use case.
See #19186 (comment).
While I was at it I also fixed/shortened the font attribute used to specify the font (first commit).
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).