You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch from a hand-written glyph outline decomposer to FreeType's one.
Instead of walking through FT_Outline ourselves, use FreeType's
FT_Outline_Decompose to decompose glyphs into paths.
Fixes incorrect positioning of first and last control points of certain
contours; compare e.g.
```python
from pylab import *
from matplotlib.textpath import TextPath
from matplotlib.patches import PathPatch
rcParams["mathtext.fontset"] = "stixsans"
path = TextPath((0, 0), r"$\delta$", size=72)
plot(*path.vertices.T, ".-", lw=.5)
gca().add_patch(PathPatch(path, alpha=.5))
gca().set(aspect="equal")
show()
```
before and after the patch (before the patch, the inner loop was not
properly closed). (Technically, I believe the earlier bug affected
start/end-of-contours that are implicitly created per the ttf format at
the midpoint two conic control points.)
End-of-contours are now encoded as LINETOs instead of CLOSEPOLYs.
Because contours are not stroked, this is fine.
A few SVG files need to be updated too.
0 commit comments