chiark / gitweb /
Don't emit first point of a contour twice
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 2 Nov 2024 19:24:42 +0000 (19:24 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 14 Nov 2024 22:27:18 +0000 (22:27 +0000)
Type 2 charstrings implicitly close each contour with a line, so there's
no need for us to explicitly do so.

bedstead.c

index 14b9cc22c7bd2addf1e86eb65cf1e83324c50da3..c1ee06a9434b27a87e7bf27d0136f3e0143268de 100644 (file)
@@ -3571,6 +3571,7 @@ emit_contour(point *p0)
 {
        point *p = p0, *p1;
 
+       if (p->prev) p->prev->next = NULL; /* Break the loop. */
        do {
                printf(" %g %g %s\n",
                       (double)(p->v.x - cur.x) / XSCALE,