chiark
/
gitweb
/
~bjharris
/
bedstead.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
357fbbc
)
webstead: slightly cleverer path translation
author
Ben Harris
<bjh21@bjh21.me.uk>
Tue, 16 Sep 2025 21:12:25 +0000
(22:12 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Tue, 13 Jan 2026 21:42:18 +0000
(21:42 +0000)
Now paths with successive rlineto operations (to avoid overflowing the
Type 2 stack) work.
webstead.xhtml
patch
|
blob
|
history
diff --git
a/webstead.xhtml
b/webstead.xhtml
index 2f17fe863a830a72dd2093c6f455cdf5b7e01ae3..0c23a5bd80633d62bde86342a620f88ff32983e8 100644
(file)
--- 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/, ""));
}
});