Skip to content

Commit 736ac51

Browse files
authored
FONTSAMPLER - Enable option to use HEX vs OCTAL on page info (#2018)
* Enable optional to use HEX vs OCTAL for charset number (in page title) and grid row/column titles. * Fix typos in documentation.
1 parent ae52a44 commit 736ac51

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

lispusers/FONTSAMPLER

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
22

3-
(FILECREATED " 3-Feb-2025 20:08:40" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;10 8777
3+
(FILECREATED " 5-Feb-2025 17:03:38" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;11 9743
44

55
:EDIT-BY "mth"
66

7-
:CHANGES-TO (FNS FontTable)
7+
:CHANGES-TO (FNS FontSample FontTable)
88

9-
:PREVIOUS-DATE " 3-Feb-2025 13:06:38" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;7
9+
:PREVIOUS-DATE " 3-Feb-2025 20:08:40" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;10
1010
)
1111

1212

@@ -20,7 +20,9 @@
2020
(DEFINEQ
2121

2222
(FontSample
23-
[LAMBDA (Fonts CharacterSets Printer StreamType) (* edited%: "29-Apr-87 22:03")
23+
[LAMBDA (Fonts CharacterSets Printer StreamType Hexadecimal)
24+
(* ; "Edited 5-Feb-2025 17:02 by mth")
25+
(* edited%: "29-Apr-87 22:03")
2426
(LET* [[TitleFont (FONTCREATE NIL 12 'MRR 0 (OR StreamType (PRINTERTYPE Printer]
2527
(FontList (if (LISTP Fonts)
2628
else (CONS Fonts)))
@@ -38,7 +40,7 @@
3840
(NEQ CharacterSet
3941
LastCharacterSet
4042
))
41-
TitleFont InchesToPrinterUnits))
43+
TitleFont InchesToPrinterUnits Hexadecimal))
4244
finally (CLOSEF Stream])
4345

4446
(FontSampleFaked
@@ -55,7 +57,8 @@
5557
(CLOSEF Stream])
5658

5759
(FontTable
58-
[LAMBDA (Font CharacterSet Stream FormFeed TitleFont InchesToPrinterUnits)
60+
[LAMBDA (Font CharacterSet Stream FormFeed TitleFont InchesToPrinterUnits Hexadecimal)
61+
(* ; "Edited 5-Feb-2025 17:03 by mth")
5962
(* ; "Edited 3-Feb-2025 20:07 by mth")
6063
(* edited%: "29-Apr-87 22:36")
6164
(LET*
@@ -76,24 +79,33 @@
7679
(YCellSpacing (TIMES 0.5 InchesToPrinterUnits)))
7780
(printout T Title .I0.8 CharacterSet "Q" T)
7881
(RESETLST
79-
(RESETSAVE (RADIX 8))
82+
(RESETSAVE (RADIX (if Hexadecimal
83+
then 16
84+
else 8)))
8085
(MOVETO (FTIMES 0.75 InchesToPrinterUnits)
8186
(FTIMES 10 InchesToPrinterUnits)
8287
Stream)
8388
(DSPFONT TitleFont Stream)
84-
(printout Stream Title .I0.8 CharacterSet)
89+
(if Hexadecimal
90+
then (printout Stream Title .I0.16 CharacterSet)
91+
else (printout Stream Title .I0.8 CharacterSet))
8592
(DSPYPOSITION (PLUS (DSPYPOSITION NIL Stream)
8693
(TIMES -0.4 (FONTHEIGHT TitleFont)))
8794
Stream)
88-
(printout Stream "8")
95+
(printout Stream (if Hexadecimal
96+
then "16"
97+
else "8"))
8998
(for XPosition from (TIMES 0.75 InchesToPrinterUnits) by XCellSpacing as Counter
9099
from 0 to 15 bind (YPosition _ (TIMES 9.5 InchesToPrinterUnits))
91100
do (MOVETO XPosition YPosition Stream)
92101
(PRIN1 Counter Stream))
93102
(for YPosition from (TIMES 9 InchesToPrinterUnits) by (MINUS YCellSpacing) as Counter
94103
from 0 to 240 by 16 bind (XPosition _ (TIMES 0.25 InchesToPrinterUnits))
95104
do (MOVETO XPosition YPosition Stream)
96-
(PRIN1 Counter Stream)))
105+
(PRINTNUM (if Hexadecimal
106+
then '(FIX 2 16 T)
107+
else '(FIX 3 8))
108+
Counter Stream)))
97109
(DRAWLINE (TIMES 0.25 InchesToPrinterUnits)
98110
(TIMES 9.3 InchesToPrinterUnits)
99111
(TIMES 8.0 InchesToPrinterUnits)
@@ -139,11 +151,15 @@
139151
(FTIMES 0.75 InchesToPrinterUnits)
140152
Stream)
141153
(DSPFONT TitleFont Stream)
142-
(printout Stream Title .I0.8 CharacterSet)
154+
(if Hexadecimal
155+
then (printout Stream Title .I0.16 CharacterSet)
156+
else (printout Stream Title .I0.8 CharacterSet))
143157
(DSPYPOSITION (PLUS (DSPYPOSITION NIL Stream)
144158
(TIMES -0.4 (FONTHEIGHT TitleFont)))
145159
Stream)
146-
(printout Stream "8")
160+
(printout Stream (if Hexadecimal
161+
then "16"
162+
else "8"))
147163
[if (EQ (FILENAMEFIELD (FULLNAME Stream)
148164
'HOST)
149165
'LPT)
@@ -169,6 +185,6 @@
169185
FONT)
170186
)
171187
(DECLARE%: DONTCOPY
172-
(FILEMAP (NIL (645 8614 (FontSample 655 . 2106) (FontSampleFaked 2108 . 2917) (FontTable 2919 . 8612))
188+
(FILEMAP (NIL (657 9580 (FontSample 667 . 2302) (FontSampleFaked 2304 . 3113) (FontTable 3115 . 9578))
173189
)))
174190
STOP

lispusers/FONTSAMPLER.LCOM

251 Bytes
Binary file not shown.

lispusers/fontsampler.tedit

385 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)