/*
** html_font.ced
**
** $VER: html_font.ced 1.0 (12.02.1998)
**
** Arexx script for HTML v3.2 font options
**
** This script works with CygnusEd Professional v4.2
**
** Copyright © Eric BELLE
*/

/*
**------------------------------------------------------------------------------
**	Initialisation
**------------------------------------------------------------------------------
*/

OPTIONS RESULTS							/* Tell CygnusEd to return results. */
NL = '0A'X									/* Alias for new line. */
KRETURN = RAWKEY 68					/* Shortcut to the return key. */
KTAB = RAWKEY 66						/* Shortcut to the tab key. */
STATUS TABSARESPACES				/* Return TAB mode ("tab" or "space"). */
IF RESULT = 1								/* Test the TAB mode. */
THEN "TABS = SPACES"				/* Switch TAB mode from "space" to "tab". */
ELSE NOP										/* No operation. */
TAB SIZE 1									/* Set TAB size proportional to 2 spaces. */

/*
**------------------------------------------------------------------------------
**	Font size
**------------------------------------------------------------------------------
*/

GETNUMBER "3" '"Font size (def=3)?"' 1 7
FontSize = RESULT

IF (FontSize=" ")
THEN EXIT 0
ELSE NOP

/*
**------------------------------------------------------------------------------
**	Font color
**------------------------------------------------------------------------------
*/

GETSTRING "#000000" '"Font color (#RGB)?"'
FontColor = RESULT

IF (FontColor=" " | FontColor="RESULT")
THEN EXIT 0
ELSE NOP

/*
**------------------------------------------------------------------------------
**	Html font structure
**------------------------------------------------------------------------------
*/

TEXT "<FONT SIZE=" || FontSize || " COLOR=" || FontColor || ">"
"AUTO-INDENT" ; KTAB
TEXT "Sould be modified - Font options"
"AUTO-INDENT" ; BACKTAB
TEXT "</FONT>"

/*
**------------------------------------------------------------------------------
**	End of html_font.ced Arexx script
**------------------------------------------------------------------------------
*/

EXIT 0
