Re-enable tests when building wasm wheels - #32141
Conversation
|
So I didn't expect this to pass; just confirming it's broken on CI just as it is locally. What's confusing to me is that 99% of the failures are in Based on debugging locally, some differences arise here: matplotlib/lib/matplotlib/backends/backend_agg.py Lines 180 to 199 in a888f5e The transform set on the font is the same (once scaled to fixed-precision ints), but after rendering the glyph, the bitmap is one pixel off (either in x/y or sometimes in size as well.) |
I managed to find |
|
I did not verify all tests, but I'm leaning towards the problem specifically being with STIX fonts as (aside from the tests that are specifically about STIX) the images that fail all have e.g., scaled parentheses/radicals/etc from one of those fonts. No tests outside of Comparing DejaVu Sans, STIXSizThreeSymReg and LastResortHE-Regular with fontTools, it looks like DejaVu has unitsPerEm=2048 while STIX is 1000. Unfortunately, Last Resort is also 2048, so it's not some kind of lower resolution grid problem. The OS/2 table in DejaVu is version 1 while STIX is 2 and Last Resort is 4. I think this just means there are additional fields for metrics and should not affect rendering algorithms (outside of which metric to choose.) The other difference is that the DejaVu header has flags that say it a) has instructions that may depend on point size and b) instructions may alter the advance width (i.e., glyphs may not be spaced exactly the same distance apart depending on font size.) Along those line, it also has the DejaVu also has a So I edited out all the glyph instructions, and the |
|
I've pushed a change to add more debug logging from FreeType. This is where I get confused though because there is no trace of any debug logging from the TrueType driver code, and yet somehow the glyphs are loaded and rendered. Not only that, even if I explicitly patch in a |
PR summary
See title; WIP.
AI Disclosure
None
PR quality check