Commit 5e5ce02
Remove ttconv and implement Type-42 embedding using fontTools (matplotlib#20866)
* Type-42 fonts using fontTools
Split _backend_pdf_ps.get_glyphs_subset into two functions:
get_glyphs_subset returns the font object (which needs to be
closed after using) and font_as_file serializes this object
into a BytesIO file-like object.
* Remove ttconv
Move the test in lib/matplotlib/tests/test_ttconv.py to
lib/matplotlib/tests/test_backend_pdf.py. Actually it has not been
a test of ttconv for a while, since type-3 conversion has not been
using ttconv.
* Add several more droppable tables
Fonttools cannot subset these and drops them; avoid the warning.
* Don't crash if the loca table is missing
Also don't end up in an infinite loop if there is a larger gap
between breakpoints than we would like.
* Don't crash if glyph bounds cannot be found
* Log the name of unsupported fonts
FT2Font throws RuntimeError for some fonts
* Get names from the original font
Not the subsetted one, since in some cases fontTools.subset
does not produce a good name table.
* Document ttconv removal
* Apply fixes from code review
* Clean up some ttconv replacements
De-wrap a few lines now that we allow longer lines.
---------
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>1 parent 25a05f2 commit 5e5ce02
File tree
17 files changed
+276
-2562
lines changed- doc/api/next_api_changes/removals
- extern
- ttconv
- lib/matplotlib
- backends
- tests
- baseline_images/test_backend_pdf
- src
17 files changed
+276
-2562
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments