Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
84adc51
to78df724
CompareGenerally 👍 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? |
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...
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 |
Uh oh!
There was an error while loading.Please reload this page.
... 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).