.key FONT/A,SIZE/A,SCALE/S,PROP/S,ITALIC/S,BOLD/S,UNDERLINE/S,CLEAR/S
.bra <
.ket >

if "<FONT>" eq "topaz"
	if "<SIZE>" eq "9" val
		echo "*E]50;topaz.9"
		skip setstyle
	endif
	if "<SIZE>" eq "8" val
		echo "*E]50;topaz.8"
		skip setstyle
	endif
endif

if exists "FONTS:<FONT>.font"
	if "<SCALE>" eq "SCALE"
		echo "*E]50;<FONT>.<SIZE>"
		skip setstyle
	else
		if exists "FONTS:<FONT>/<SIZE>"
			echo "*E]50;<FONT>.<SIZE>"
			skip setstyle
		else
			fault 205
			quit 10
		endif
	endif
else
	fault 205
	quit 10
endif


lab setstyle

echo "*E[0m"
if "<ITALIC>" eq "ITALIC"
	echo "*E[3m"
endif
if "<BOLD>" eq "BOLD"
	echo "*E[1m"
endif
if "<UNDERLINE>" eq "UNDERLINE"
	echo "*E[4m"
endif
if "<CLEAR>" eq "CLEAR"
	echo "*E[H*E[2J"
endif
