/[james]/archive/fontscd/Fonts
ViewVC logotype

Annotation of /archive/fontscd/Fonts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13 - (hide annotations) (download)
Mon Feb 10 20:34:04 2003 UTC (21 years, 8 months ago) by james
File size: 2159 byte(s)
Initial import.

1 james 13 REM > !FontsCD.Fonts
2    
3     ON ERROR ON ERROR OFF: PRINT "Error: "+REPORT$+" ("+STR$ERL+")": END
4    
5     SYS"Territory_Number" TO Terr%
6    
7     REPEAT
8    
9     CLS
10     PRINT"EFF 4000 PD Fonts CD installer"
11     PRINT"ииииииииииииииииииииииииииииии"
12     PRINT"1. View installed fonts"
13     PRINT"2. Install font family"
14     PRINT"3. Quit"
15     PRINT""
16     PRINT"Please choose: ";
17     REPEAT: g$ = GET$: UNTIL g$ > "0" AND g$ < "4"
18     PRINT g$
19     PRINT
20    
21     CASE g$ OF
22     WHEN "1": PROCList
23     WHEN "2": PROCInstall
24     WHEN "3": END
25     ENDCASE
26    
27     PRINT'"Press a key..."
28     IF GET
29    
30     UNTIL 0
31     END
32    
33    
34     DEF PROCList
35     f% = OPENIN("<FontsCD$Dir>.List")
36     IF f% = 0 THEN PRINT"No fonts currently installed": ENDPROC
37     CLOSE#f%
38    
39     PRINT"Installed fonts:"
40     OSCLI"Type <FontsCD$Dir>.List"
41     ENDPROC
42    
43    
44     DEF PROCInstall
45     INPUT"Name of font to install: "f$
46     f$ = FNString_Lower(f$)
47     l$ = LEFT$(f$, 1)
48    
49     CASE TRUE OF
50     WHEN INSTR("ab", l$) <> 0: d$ = "ab"
51     WHEN INSTR("cde", l$) <> 0: d$ = "cde"
52     WHEN INSTR("fghi", l$) <> 0: d$ = "fghi"
53     WHEN INSTR("jkl", l$) <> 0: d$ = "jkl"
54     WHEN INSTR("mn", l$) <> 0: d$ = "mn"
55     WHEN INSTR("opq", l$) <> 0: d$ = "opq"
56     WHEN INSTR("rs", l$) <> 0: d$ = "rs"
57     WHEN INSTR("tuvw", l$) <> 0: d$ = "tuvw"
58     WHEN INSTR("xyz", l$) <> 0: d$ = "xyz"
59     OTHERWISE: PRINT"Invalid font name": ENDPROC
60     ENDCASE
61    
62     f% = OPENIN("<FontsCD$Dir>." + d$ + ".Fonts")
63     d% = FALSE
64     n% = 0
65     REPEAT
66     z$ = GET$#f%
67     y$ = FNString_Lower(LEFT$(MID$(z$, 6)))
68     IF (y$ = f$) OR (LEFT$(y$, LENf$ + 1) = f$ + ".") THEN PROCFound: d% = TRUE: n% += 1
69     UNTIL EOF#f%
70     CLOSE#f%
71    
72     IF d% THEN
73     SYS"OS_CLI", "FontInstall"
74     PRINT STR$n% + " fonts successfully installed"
75     ELSE
76     PRINT"Font not found"
77     ENDIF
78     ENDPROC
79    
80    
81     DEF PROCFound
82     g% = OPENUP("<FontsCD$Dir>." + d$ + ".Messages" + STR$Terr%)
83     PTR#g% = EXT#g%
84     BPUT#g%, z$
85     CLOSE#g%
86     h% = OPENUP("<FontsCD$Dir>.List")
87     IF h% = 0 THEN h% = OPENOUT("<FontsCD$Dir>.List")
88     PTR#h% = EXT#h%
89     BPUT#h%, LEFT$(MID$(z$, 6))
90     CLOSE#h%
91     PRINT"Installing font Р" + LEFT$(MID$(z$, 6)) + "С"
92     ENDPROC
93    
94    
95     DEF FNString_Lower(Text$)
96     LOCAL Resu$, Loop%, Char%
97     IF Text$ = "" THEN =""
98     Resu$ = ""
99     FOR Loop% = 1 TO LEN(Text$)
100     Char% = ASC(MID$(Text$, Loop%, 1))
101     IF Char% > 64 AND Char% < 91 THEN Char% += 32
102     Resu$ += CHR$(Char%)
103     NEXT
104     =Resu$

  ViewVC Help
Powered by ViewVC 1.1.26