* src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.

A cubic contour has to always start from an on-point. Therefore, we
should not swap the first with the last point, which might be off, and
obtain an invalid contour. This does not matter for conic contours.
If anything, it also saves one swap there. Fixes #1207.
This commit is contained in:
Alex Ringlein 2023-02-16 22:38:35 -05:00 committed by Alexei Podtelezhnikov
parent 0eca6ead82
commit 74ea5454cc
1 changed files with 4 additions and 0 deletions

View File

@ -556,6 +556,10 @@
{
last = outline->contours[n];
/* keep the first contour point as is and swap points around it */
/* to guarantee that the cubic arches stay valid after reverse */
first++;
/* reverse point table */
{
FT_Vector* p = outline->points + first;