#
#
RES in JavaScript
RES test suite
Named glyphs
A1-[shade]A1[scale=0.4]-[shade]A1[xscale=0.5]-[shade]A1[yscale=0.5]-[shade]A1[scale=1.5,xscale=0.5,yscale=0.5]
A1[shade]-A1[b]-A1[t]-A1[s]-A1[e]-A1[be]-A1[se]-A1[st]-A1[noshade,stb,bb]
A1[silver]-B1[white]-C1[gray]-D1[yellow]-E1[fuchsia]-F1a[aqua]-G1[olive]-Aa7a[purple]
![shade]H1[teal]-I1[red]-K1[lime]-L1[blue]-M1[maroon]-N1[green]-NL1[navy]-NU1[black]
A1[mirror]-A1[mirror,scale=0.4]-A1[nomirror,noshade]
A1[rotate=15]-A1[rotate=45]-A1[rotate=90]-A1[rotate=180]-A1[rotate=270]
A1[rotate=15,mirror]-A1[rotate=90,mirror]-A1[rotate=270,mirror]
A1[mirror,rotate=90,scale=0.4]-[shade]A1[mirror,rotate=45,xscale=0.4]
mSa-100-10-"["-"?"-"\""-"\\"-open-close
Operators
A1-B1-C1
A1*B1*C1
D1:D1:D1
A1*B1-C1:D1
D1*Z7:Z4-(D1*Z7):Z4
D1*(Z7:Z4)-D1*D1:D1*(D1:D1)
n:n:n - n:n:[sep=0]n - n:n:[sep=0,fix]n
x*x:x-x*x:[size=3]x-x*x:[size=inf,fit]x
N9:t-a:r
(A1*B1):(Z1*Z1*Z1)
A1-A1-[sep=0.5]A1-[fit]A1-[fit,sep=0]A1
A1*A1-A1*[sep=0.5]A1-A1*[fit]A1-A1*[fit,sep=0]A1
A1[rotate=90]:A1[rotate=90]-A1[rotate=90]:[sep=0.5]A1[rotate=90]-A1[rotate=90]:[fit]A1[rotate=90]-A1[rotate=90]:[fit,sep=0]A1[rotate=90]
Hm[rotate=90]:empty-[fit]empty:Hm[rotate=90]-A1-Hm[rotate=90]:empty[firm]-[fit,shade]empty:Hm[rotate=90]
A1-[t]A1-[noshade,sep=5,ss]A1
Empty glyphs
A1-empty[shade]-A1-empty[width=0.5]-A1-empty[width=2,shade]-A1:empty-A1:empty[height=0.5]-empty[firm]
empty[shade]-empty[b]-empty[t]-empty[s]-empty[e]-empty[be]-empty[se]-empty[st]-empty[stb]
Boxes
cartouche(x-A1-B2-x)-serekh[h](A1-B2)-rectangle[v](A1-B2)-Hwtopenover()-Hwtopenunder()-Hwtcloseover()-Hwtcloseunder()
cartouche(.)-serekh[h](.)-rectangle[v](.)
[vlr]cartouche(x-A1-B2-x)-cartouche[h](x-A1-B2-x)-cartouche[v](x-A1-B2-x)
cartouche(oval(A1))-inb(cartouche[v]()-A1)-oval[shade]()-![sep=0]oval(A1)-oval[undersep=1](A1)
oval[blue](A1)-oval[shade](A1)-oval[ts](A1)-![shade]serekh[scale=0.7](A1)![noshade]-![red]rectangle[size=0.5](A1)
cartouche[opensep=9.1](A1-B2)-cartouche[closesep=9.1](A1-B2)-cartouche[undersep=9.1](A1-B2)-cartouche[oversep=9.1](A1-B2)
[size=3]cartouche[v,opensep=9.1](A1-B2)-cartouche[v,closesep=9.1](A1-B2)-cartouche[v,undersep=9.1](A1-B2)-cartouche[v,oversep=9.1](A1-B2)
![mirror]Hwtopenunder(A1)-Hwtopenunder[nomirror](A1)-cartouche[mirror](A1)-cartouche[v](A1)
Stack
stack(s,r)
stack[under](Hm,D)
stack[on,x=0.76](stack[on,x=0.7](gb,gb),gb)
A1-A1-A1-stack[under](Hm,D)-A1-A1-A1
B1-B1-B1-stack[on,x=0.76](stack[on,x=0.7](gb,gb),gb)-B1-B1-B1
stack[on](A1,ra)-stack[x=0.25,on](A1,ra)-stack[on,y=0.25](A1,ra)-stack[on,x=0,y=0](A1,ra)-stack[on,x=1,y=1](A1,ra)
stack[on,x=0,y=0](A1[shade],ra)-stack[on,x=1,y=1](A1,ra[shade])
Insert
insert[ts,sep=0](A1,ra)-insert[te,sep=0](zA,ra)-insert[bs,sep=0](zA,ra)-insert[be,sep=0](zA,ra)
insert[te,sep=0](zA,ra)-insert[te,sep=0.5](zA,ra)-insert[te,sep=1](zA,ra)
insert[te,sep=0.5](zA[shade],ra)-insert[te,sep=0.5](zA,ra[shade])-![shade]insert[te,sep=0.5](zA,ra)
insert[x=0.8,fix](empty,A1)-[shade]insert[x=0.2,fix](empty,A1)-[shade]insert[y=0.2,fix](empty,A1)-[shade]insert[y=0.8,fix](empty,A1)
insert[x=0.5,y=0.5,fix,sep=0.3](oval(),A1)-insert[x=0.6,y=0.6,fix,sep=0.3](oval(),A1)
insert[x=0.8,y=0.8,fix](empty,A1)-insert[fix](empty[height=2]:oval(),A1)-insert[fix,x=.3,y=.4](empty[width=2,height=2]:oval(),A1)
insert[t,x=0.9,sep=0.5](zA,ra)-insert[t,x=0.6,sep=0.5](zA,ra)-insert[t,x=0.3,sep=0.5](zA,ra)
insert[t,x=0.9,sep=0](zA,x)-insert[t,x=0.6,sep=0](zA,x)-insert[t,x=0.4,sep=0.0](zA,x)
insert[sep=0](cartouche(),A1)-insert[x=0.9,sep=0](cartouche(),A1)-insert[x=0.9,y=0.2,sep=0](cartouche(),A1)
insert[s,sep=0.0](.*w,t)-insert[e,sep=0.0](w*.,t)
insert[b](ns,x)-insert[bs](ns,x)-insert[b](ns:.,x)-insert[bs](ns:.,x)
Modify
modify[above=1](A1)
modify[below=1,shade](A1)
modify[before=1,s](A1)
modify[after=1](A1)
modify[above=1,omit](A1)
modify[below=1,omit](A1)
modify[before=1,omit](A1)
modify[after=1,omit](A1)
modify[width=0.5](A1)-modify[height=0.5](A1)
modify[below=1](oval())-modify[omit,below=1](oval(A1))-modify[omit,above=1](cartouche(A1))
Header
[hrl](A1*B1):(Z1*Z1*Z1)
[hrl]A1[scale=0.5,rotate=15,mirror]
[vlr]A1*B1-Z1*Z1*Z1
[vrl]A1*B1-Z1*Z1*Z1
[size=2]A1-Z1-A1:A1-![shade]B1:B1
[vrl,size=1.5]A1-Z1-A1*A1-![shade]B1*B1
Switches
A1-![shade]A1-A1-A1[noshade]-A1-![noshade]A1
A1-![red]A1-A1-A1[blue]-A1![black]-A1
A1 - ![shade] B1 - ![red] C1 - D1[black,noshade] - E1 - ![noshade] F1 - ![black] G1
![mirror]A1-A1[nomirror]![nomirror]-![fit,sep=0]A1*A1-A1*[nofit]A1
Notes
A1^"a"
A1^"a"^"b"
A1^"a"^"b"^"c"
A1^"a"^"b"^"c"^"d"
A1[shade]^"a"^"b"^"c"^"d"^"e"
rectangle(A1)^"abc"
[vlr]A1-B1[shade]^"a"^"b"^"c"^"d"^"e"-C1-A1*A1[shade]^"a"^"b"^"c"^"d"^"e"-D1
[vrl]A1-B1[shade]^"a"^"b"^"c"^"d"^"e"-C1-A1*A1[shade]^"a"^"b"^"c"^"d"^"e"-D1
A1^"abc"-A1^"\\"[blue]-A1^"\""[red]-A1^"\\\""[green]
empty-x:x^"a":x-empty^"abc"-A1-empty[shade]^"def"
B1-B1-A1^"abc"^"def"-C1
[hrl]B1-B1-A1^"abc"^"def"-C1