
! script name: draft.d/storefont
! topic: store current font

!A
!A NAME:
!A
!A 	Store the Current Font into the font file.
!A
!A DESCRIPTION:
!A
!A 	This script will store the modified font (characters not changed by
!B 	the user will remain the same) created by the user with the MAKE USER
!A 	CHAR file.  The fonts that are presently stored will be overridden.
!A
!A 	WARNING - DO NOT store in one of these options unless there is
!A 	no doubt in your mind that the present files should be overridden.
!A
!B INSTRUCTIONS:
!B
!B 	FONT NUMBER ( 1 ) ( 2 ) ( 3 ): Enter the number to be used for
!B 		the reference for the stored characters.
!B
!B 	To modify a font the following procedure should be followed.
!B
!B 		1: Select New file.
!B 		2: Execute the script draft.d/explodefont - this explodes the
!B 		   font geometry onto layers corresponding to ascii numbers.
!B 		3: Modify the geometry for characters on the appropriate layers.
!B 		4: Execute the script draft.d/usercharseq - this sets the
!B 		   characters.
!B 		5: Execute the script draft.d/storefont - this stores the font.
!B 		6: Check what you have done.
!B
!B 	Only experienced users should try this procedure.
!B 	ANY QUESTIONS call customer service.
!B
!# see also - help.d/fonts.hlp

stat=ChangeLabelStr("ScriptNameStatus","Function: store the current font ")

DIM Destination$[256]
DIM Answer$[256]
DIM Fontfile$[256]

DEG


fontnum=1

Stat=SetInputFormat("n0=","")
Stat= SetEqualsValue(fontnum)
fontnum=GetValue("FONT NUMBER ( 1 ) ( 2 ) ( 3 )",Answer$)
IF (ExitScript(Destination$)) THEN Leave

fontfile$= "synergy.font"
SELECT fontnum
CASE 0
CASE 1
        fontfile$= "synergy.font"
CASE 2
        fontfile$= "synergy.font1"
CASE 3
        fontfile$= "synergy.font2"
CASE 4
        fontfile$= "symbols.font"
CASE 5
        fontfile$= "symbols.font1"
CASE 6
        fontfile$= "symbols.font2"
CASE ELSE
        fontfile$= "synergy.font"&VAL$(I)
END SELECT

stat= StoreFont(Fontfile$,fontnum)

Stat=SetInputFormat("a1=",",Y,N,")
Stat= SetEqualsValue(0,"N")
Stat=GetValue("UPDATE /usr/weber/bin/   Yes or No ",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$= "Y" THEN
	Fontfile$=FileNameString("/usr/weber/bin",Fontfile$)
	stat= StoreFont(Fontfile$,fontnum)
END IF

Leave:!
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
