shell script for getting asy paths from font glyph data
This commit is contained in:
parent
b935b2190b
commit
32a940467f
3
glif2asy.sh
Executable file
3
glif2asy.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sd -f m '</contour>(\n| )*<contour>' '^^' | sd -f m '(.|\n)+<contour>' '' | sd -f m '</contour>(.|\n)+' '' | sd '^ +' '' | sd -f m '<point x="(-?[0-9]+)" y="(-?[0-9]+)"/>\n<point x="(-?[0-9]+)" y="(-?[0-9]+)"/>\n' '..controls ($1,$2) and ($3,$4)..' | sd '<point x="(-?[0-9]+)" y="(-?[0-9]+)" type="curve".*/>' '($1,$2)' | sd -- '<point x="(-?[0-9]+)" y="(-?[0-9]+)" type="line" smooth="yes"/>' '---($1,$2)' | sd -- '<point x="(-?[0-9]+)" y="(-?[0-9]+)" type="line"/>' '--($1,$2)' | tr -d '\n'
|
Loading…
Reference in a new issue