;***********************************************************************
; FunFont Font installation script (v1.0)
; written by Andrew J Bailey (Carbon)
; © CREATIVE DESIGN 1997
;***********************************************************************

;PROCEDURES
;**********


(procedure preview (
 (set #speak "select a font, to install.")
 (talk)
 (message "\nYou are now required to select a font to install.\n\n"
          "To help you choose an appropriate font,\n"
          "a preview follows...\n\n"
          "Fonts are identified by their index number 1-12\n\n"
          "Press PROCEED to continue.")

 (run "run >NIL: <NIL: sys:utilities/multiview images/FontPreview.pic")
))

;***********************************************************************

(procedure font (
 (set #speak "Please note the index numbers, displayed in wite.")
 (talk)
 (set @choice
 (askchoice
 (prompt "\nSelect the font you wish to install...\n")
 (choices ("01  11P/9W/H")
          ("02  11P/7W/H")
          ("03  11P/7W/M")
          ("04   9P/7W/M")
          ("05   9P/6W/M")
          ("06   9P/5W/M")
          ("07   9P/5W/L")
          ("08   9P/4W/L")
          ("09   9P/3W/L")
          ("10   7P/7W/M")
          ("11   7P/5W/L")
          ("12   7P/3W/L")
)
 (default 3)
 (help "\n The first number is the point size of the font.\n"
       " The second number is the width of a standard letter.\n"
       " The end letter refers to the weight of the font.\n\n"
       " The selected font will REPLACE the currently installed font.\n\n"
       " The default choice is 04 which is a nine point font.")
)
)

 (run "delete fonts:funfont#? all >NIL:")

 (if (= @choice 0) (run "lha x -X -q fonts/01.fnt fonts:"))
 (if (= @choice 0) (copyfiles (source "fonts/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 1) (run "lha x -X -q fonts/02.fnt fonts:"))
 (if (= @choice 1) (copyfiles (source "fonts/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 2) (run "lha x -X -q fonts/03.fnt fonts:"))
 (if (= @choice 2) (copyfiles (source "fonts/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 3) (run "lha x -X -q fonts/04.fnt fonts:"))
 (if (= @choice 3) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 4) (run "lha x -X -q fonts/05.fnt fonts:"))
 (if (= @choice 4) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 5) (run "lha x -X -q fonts/06.fnt fonts:"))
 (if (= @choice 5) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 6) (run "lha x -X -q fonts/07.fnt fonts:"))
 (if (= @choice 6) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 7) (run "lha x -X -q fonts/08.fnt fonts:"))
 (if (= @choice 7) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 8) (run "lha x -X -q fonts/09.fnt fonts:"))
 (if (= @choice 8) (copyfiles (source "fonts/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 9) (run "lha x -X -q fonts/10.fnt fonts:"))
 (if (= @choice 9) (copyfiles (source "fonts/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 10) (run "lha x -X -q fonts/11.fnt fonts:"))
 (if (= @choice 10) (copyfiles (source "fonts/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))
 (if (= @choice 11) (run "lha x -X -q fonts/12.fnt fonts:"))
 (if (= @choice 11) (copyfiles (source "fonts/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs")))

))

;***********************************************************************

(procedure end (
 (set #speak "-w1 font installed.")
 (talk)
 (exit "\n\nFont has been successfuly installed."
       "\n\nPLEASE REBOOT SYSTEM"
 (quiet))
))

;**************************************************************************

(procedure talk (
 (if (exists "C:talk")
  (run "run >NIL: <NIL: talk" #speak)

)
))

;**************************************************************************

;SEQUENCE
;********


(preview)

(font)

(end)
