From 70cbbde7f9ed9603f33575411bfd46e7e865922b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Tue, 16 Sep 2025 22:12:25 +0100 Subject: [PATCH] webstead: slightly cleverer path translation Now paths with successive rlineto operations (to avoid overflowing the Type 2 stack) work. --- webstead.xhtml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webstead.xhtml b/webstead.xhtml index 2f17fe8..0c23a5b 100644 --- a/webstead.xhtml +++ b/webstead.xhtml @@ -25,10 +25,9 @@ .setAttribute("d", charstring .replaceAll(//g, "") .replace(/^.* [hv]stem /, "") - .replace(/^cntrmask [01]*/, "") - .replace(/^/, "m ") - .replaceAll(/ rmoveto/g, "") - .replaceAll(/ rlineto/g, "m") + .replace(/^cntrmask [01]* /, "") + .replaceAll(/(\S+ +\S+ +)rmoveto/g, "m$1") + .replaceAll(/ rlineto/g, "") .replace(/ endchar/, "")); } }); -- 2.30.2