GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Update FreeType to 2.13.3 by QuLogic · Pull Request #29816 · matplotlib/matplotlib Conversation
Member
PR summaryOn the call last week, we considered whether it made sense to do this upgrade. This PR shows the effect of doing so. Note for simplicity, I simply copied the new images from https://github.com/QuLogic/mpl-images, and then updated any new images directly. It's possible that there were some extraneously changed images as a result. I will check this shortly. The latest FreeType version supports many newer font features, and fixes several CVEs, which we were mostly hoping were not relevant to us, but this may or may not be true. Additionally, I've found that libraqm runs into issues with hinting in older versions. While I'm not entirely sure which of libraqm or FreeType holds that bug, updating libraqm to new versions would also require newer FreeType anyway. The main concern here was the repo size. Locally, I started with a completely fresh clone before creating this commit. The PR checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Removing
I'll commit these all separately to make it easier to review, but we can squash these all together if it's all working fine. The majority of these are things like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
On a related note, and I'm not sure which ones are relevant here, but I wonder if we should drop several PDF and SVG test images when they would be changed but don't effectively test anything different from the PNG. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For the repo size problem we could provide some guidance for the depth flag so most contributors don't need to download the whole thing. Eg --depth=500 gets you the last two years of commits and is x MB. Most folks don't need the full commit history (or even anything more than depth=1) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The first image comparison that shows up Is it beneficial/necessary to grab the images from that other repo you've been keeping, or would it make sense to blow away the images directory on CI and move all the resultant images into the directory to start fresh in a sense? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Surprisingly, this doesn't appear to make any difference to test images. It only affects 9 tests, and only with regards to bboxes and tight layout that are explicitly compared. This doesn't matter whether I try with FreeType 2.6.1 or 2.13.3.
Ah, you're right. I had not done a deep dive into the changes, but likely this was an image that had text that was removed, so it was regenerated from the FreeType changes, but effectively looked the same. I will go through these again and make sure we don't have any extraneous changes like this one.
The other repo was useful for tracking purposes and a quick changeover, but it might be best to start fresh and make sure we don't change too many extra images. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I haven't updated this PR for it yet, but going over the diffs, one surprising change is that while the mathtext tests with DejaVu Sans look better (more consistent baselines, tweaks to kerning), the same ones with Computer Modern look worse (mostly due to a wobbly baseline.) But on the other hand, a lot of those had the wobbly baseline before... I've also opened #29827 to remove most of the redundant PDFs that would be changed here (except the ones from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
See also #14177 (comment) and #22459 re: wobbly baseline. I have some hopes that switching agg+usetex to rasterizing glyphs ourselves (see also #29807) would be one way to fix that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Slightly unrelated, but if we decide to update this many PNGs, it should be a good time to add an oxipng pre-commit hook. https://github.com/shssoichiro/oxipng I would expect that the sizes are halved or so on average. (It would be useful independent of this, but I have not gotten around to propose it and it would be unfortunate to change all those images without compression.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
But these are not Unfortunately, updating FreeType still causes changes in those test images due to different kerning and metrics (the whole line may move up/down a pixel, but individual glyphs no longer do.) So I'm going to roll that change in here for the changed images to be squashed together. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I've now rebased this on top of #29827, and gone through and removed the extra image changes. Now it's about 60% the number it was before. As I expect this will be squashed, there are a few things here:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Are the new tests also using hinting_factor=1? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
No, as I mentioned earlier, that barely changed anything. I'm trying to see if that's true or whether I didn't set it up right. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5dc2aee to
f472e52
Compare
| if getattr(mpl, '_called_from_pytest', False): | ||
| mpl.rcParams['text.hinting'] = 'default' | ||
| mpl.rcParams['text.hinting_factor'] = 1 | ||
| else: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
if this is for backward compatibility, can you please add a comment?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Added a comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I removed the test images here, but I realized that I can pre-populate the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Namely, `text.hinting` is now `default` instead of `force_autohint` (or `none` for classic tests) and `text.hinting_factor` is now 1, not 8.
We don't use Perl, and it includes a completely busted version of `patch`.
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
This factor existed only to preserve test images, but as of matplotlib#29816, it is set to 0 (i.e., disabled and providing default behaviour). In the future, with libraqm, it will have no effect no matter its setting (because we won't be applying kerning ourselves at all.)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
tight_layout and font hinting cuts text near the edge [MNT]: Please update freetype version Determine ifhinting_factor setting can be dropped
There was an error while loading. Please reload this page.