; Digita Wordworth Font Installer v1.1, by Mark Jackson

Echo "*NDigita Wordworth Font Installer"
Echo "Copyright (C) 1998 Digita International.*N"

If NOT Exists ENV:Wordworth/WwFonts
	Echo "*NERROR: Wordworth does not seem to be installed correctly."
	Echo "*NIf you run Wordworth from floppy-disks then you must boot your"
	Echo "Amiga from the 'Wordworth' disk before running this installer."
	Ask "*NPress Return to exit."
	Quit
EndIf

Type ENV:Wordworth/WwFonts >ENV:FontPath
CD >ENV:CurrentDir

RequestChoice >ENV:Result "InstallFonts" "Do you want to add to the old*Nfontlist or overwrite it?" "Add" "Overwrite"
If $Result eq 0
	Echo "*NPlease wait... Deleting files"

	CD >NIL: "$FontPath"
	CD >NIL: UFST
	Delete >NIL: FontList
	Delete >NIL: (#?.font|#?.otag)
EndIf

CD >NIL: "$FontPath"
CD >NIL: Intellifont
CD >ENV:IntelliDir
CD >NIL: "$CurrentDir"

RequestFile >ENV:NewFontPath TITLE "Select Fonts drawer..." POSITIVE "Install" NOICONS DRAWERSONLY DRAWER "$IntelliDir"
If warn
	UnSetEnv >NIL: FontPath
	UnSetEnv >NIL: CurrentDir
	UnSetEnv >NIL: IntelliDir
	Quit
EndIf

Echo "*NPlease wait... Installing fonts"

InstallOutlines $NewFontPath

UnSetEnv >NIL: FontPath
UnSetEnv >NIL: CurrentDir
UnSetEnv >NIL: IntelliDir
