;This "Installer" script will configure the users system to support 
; the Dingbats character set. 
; Background:
; Fountain version 37.10 sets L1 as the default symbol set. To support Dingbats
; we need to copy a new version of IF.SS that contains character maps for Dingbats.
; The new IF.SS files will contain: 
;        L1 - Amiga Latin 1
;        GD - Gold Disk
;        D1 - Series 100
;        D2 - Series 200
;        D3 - Series 300
;        plus the TD symbol sets, minus Ventura


; if something goes wrong, reset diskfont variable

(onerror (run "setenv env:sys/diskfont SYMSET L1"))




(set SymSet
      (askchoice
           (prompt 
           "The Agfa Intellifont ITC Zapf Dingbats typeface requires a special character set."
           " Please refer to the last three pages of the enclosed \"Agfa ITC Zapf Dingbats Installation\" document. "
           " This will help you decide the character set you want to select.")
                          
                  (help 
                     "In order to take advantage of the rich set of characters"
                     " in the ITC Zapf Dingbats collection, we need to add additional"
                     " symbol sets. These symbol sets contain the following character maps:\n"
                     "\n   D1 - ITC Zapf Dingbats Series-100\n"
                     "     D2 - ITC Zapf Dingbats Series-200\n"
                     "     D3 - ITC Zapf Dingbats Series-300\n"
                     "\n"
                     " Refer to the enclosed document for print sample of the above selection."
                     )
                  (choices "D1" "D2" "D3")
                  (default "D1")                                    
         )
)


    
;if the original IF.SS file is installed, copy new file


(set ifssSize (getsize "fonts:_bullet/if.ss"))


(if (< ifssSize 1)
   
   (Abort " \"fonts:_bullet/if.ss\" not found."
          " Please execute \"IntellifontSystemChek\""
   )        
)



(if (> 2000 ifssSize)
    
   (
    (run "copy fonts:_bullet/if.ss to fonts:_bullet/if.ss.org")  
    (copyfiles
                      
            (prompt "Copying a new symbol set maps to support"
            " ITC Zapf Dingbats"
            )
            
            (help @copyfiles-help)
            (source "df0:Intellifontfiles")
            (dest "fonts:_bullet")
            (pattern "if.ss")
            (files)
            (confirm)
     )
   )
)            

; set system variable

(if (= SymSet 0)
 (run "setenv env:sys/diskfont SYMSET D1")
)

(if (= SymSet 1)
 (run "setenv env:sys/diskfont SYMSET D2")
)

(if (= SymSet 2)
 (run "setenv env:sys/diskfont SYMSET D3")
)


(message "The installer will now execute Fountain for you.\n"
        " NOTE: This installer only works with ITC Zapf Dingbats Fonts." 
        " You MUST only install Dingbats, then exit from Fountain,"
        " and finish the Install !!! " 
)
(run "sys:system/fountain")

(run "setenv env:sys/diskfont SYMSET L1")

(trap 12345 (run "setenv env:sys/diskfont SYMSET L1"))

(exit)
