|
1 | 1 | (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) |
2 | 2 |
|
3 | | -(FILECREATED " 5-Feb-2025 17:03:38" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;11 9743 |
| 3 | +(FILECREATED " 5-Dec-2025 11:09:30" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;6 12333 |
4 | 4 |
|
5 | 5 | :EDIT-BY "mth" |
6 | 6 |
|
7 | 7 | :CHANGES-TO (FNS FontSample FontTable) |
8 | 8 |
|
9 | | - :PREVIOUS-DATE " 3-Feb-2025 20:08:40" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;10 |
| 9 | + :PREVIOUS-DATE " 4-Dec-2025 23:56:07" {DSK}<home>matt>Interlisp>medley>lispusers>FONTSAMPLER.;5 |
10 | 10 | ) |
11 | 11 |
|
12 | 12 |
|
|
21 | 21 |
|
22 | 22 | (FontSample |
23 | 23 | [LAMBDA (Fonts CharacterSets Printer StreamType Hexadecimal) |
| 24 | + (* ; "Edited 5-Dec-2025 11:06 by mth") |
24 | 25 | (* ; "Edited 5-Feb-2025 17:02 by mth") |
25 | | - (* edited%: "29-Apr-87 22:03") |
26 | | - (LET* [[TitleFont (FONTCREATE NIL 12 'MRR 0 (OR StreamType (PRINTERTYPE Printer] |
| 26 | + (* ; "Edited 29-Apr-87 22:03") |
| 27 | + (LET* [[TitleFont (FONTCREATE NIL 12 'MRR 0 (SETQ StreamType (OR StreamType (PRINTERTYPE Printer] |
27 | 28 | (FontList (if (LISTP Fonts) |
28 | 29 | else (CONS Fonts))) |
29 | 30 | [Stream (OPENIMAGESTREAM Printer StreamType (LIST 'FONTS (CONS TitleFont FontList] |
30 | 31 | (InchesToPrinterUnits (FTIMES 72.0 (DSPSCALE NIL Stream))) |
31 | 32 | (LastFont (CAR (LAST FontList))) |
32 | 33 | [CharacterSets (if (LISTP CharacterSets) |
33 | 34 | then CharacterSets |
| 35 | + elseif (MEMB CharacterSets '(T :INCORE :ALL :INTERESTING)) |
| 36 | + then CharacterSets |
34 | 37 | else (LIST (OR CharacterSets 0] |
35 | | - (LastCharacterSet (CAR (LAST CharacterSets] |
| 38 | + (AllCharacterSets (CONSTANT (for CS from 0 to 255 collect CS] |
36 | 39 | (DSPRIGHTMARGIN (fetch (REGION WIDTH) of (DSPCLIPPINGREGION NIL Stream)) |
37 | 40 | Stream) |
38 | | - (for Font in FontList do (for CharacterSet in CharacterSets |
39 | | - do (FontTable Font CharacterSet Stream (OR (NEQ Font LastFont) |
40 | | - (NEQ CharacterSet |
41 | | - LastCharacterSet |
42 | | - )) |
43 | | - TitleFont InchesToPrinterUnits Hexadecimal)) |
| 41 | + (for Font in FontList do |
| 42 | + (* ;; "Check for the special charset list builders") |
| 43 | + |
| 44 | + (LET (FontCharacterSets (SlugCharsetInfo (\GETCHARSETINFO Font |
| 45 | + SLUGCHARSET))) |
| 46 | + (SETQ FontCharacterSets |
| 47 | + (SELECTQ CharacterSets |
| 48 | + (:ALL |
| 49 | + (* ;; "Forcibly install ALL CharacterSets.") |
| 50 | + |
| 51 | + (for CS in AllCharacterSets |
| 52 | + when (\INSURECHARSETINFO Font CS) collect |
| 53 | + CS)) |
| 54 | + (:INTERESTING (for CS in *INTERESTING-CHARSETS* |
| 55 | + when (\INSURECHARSETINFO Font CS) |
| 56 | + collect CS)) |
| 57 | + ((T :INCORE) |
| 58 | + (for CS in AllCharacterSets |
| 59 | + when (\GETCHARSETINFO Font CS) collect CS)) |
| 60 | + CharacterSets)) |
| 61 | + |
| 62 | + (* ;; |
| 63 | + "Exclude any CharacterSet known to reference the SlugCharsetInfo") |
| 64 | + |
| 65 | + (SETQ FontCharacterSets (for CS in FontCharacterSets |
| 66 | + unless (EQ SlugCharsetInfo |
| 67 | + (\GETCHARSETINFO Font |
| 68 | + CS)) |
| 69 | + collect CS)) |
| 70 | + (for CharacterSet in FontCharacterSets |
| 71 | + bind (LastCharacterSet _ (CAR (LAST FontCharacterSets))) |
| 72 | + do (FontTable Font CharacterSet Stream |
| 73 | + (OR (NEQ Font LastFont) |
| 74 | + (NEQ CharacterSet LastCharacterSet)) |
| 75 | + TitleFont InchesToPrinterUnits Hexadecimal))) |
44 | 76 | finally (CLOSEF Stream]) |
45 | 77 |
|
46 | 78 | (FontSampleFaked |
47 | | - [LAMBDA (FontAsList Printer StreamType) (* N.H.Briggs "27-Apr-87 18:12") |
| 79 | + [LAMBDA (FontAsList Printer StreamType) (* N.H.Briggs "27-Apr-87 18:12") |
48 | 80 | (LET* [[TitleFont (FONTCREATE NIL 12 'MRR 0 (OR StreamType (PRINTERTYPE Printer] |
49 | 81 | (Font) |
50 | 82 | [Stream (OPENIMAGESTREAM Printer StreamType (LIST 'FONTS (LIST TitleFont] |
|
53 | 85 | (replace FONTFAMILY of Font with (CAR FontAsList)) |
54 | 86 | (replace FONTSIZE of Font with (CADR FontAsList)) |
55 | 87 | (replace FONTFACE of Font with (\FONTFACE (CADDR FontAsList))) |
56 | | - (FontTable Font '(0) Stream NIL TitleFont InchesToPrinterUnits) |
| 88 | + (FontTable Font '(0) |
| 89 | + Stream NIL TitleFont InchesToPrinterUnits) |
57 | 90 | (CLOSEF Stream]) |
58 | 91 |
|
59 | 92 | (FontTable |
60 | 93 | [LAMBDA (Font CharacterSet Stream FormFeed TitleFont InchesToPrinterUnits Hexadecimal) |
| 94 | + (* ; "Edited 5-Dec-2025 11:09 by mth") |
61 | 95 | (* ; "Edited 5-Feb-2025 17:03 by mth") |
62 | 96 | (* ; "Edited 3-Feb-2025 20:07 by mth") |
63 | | - (* edited%: "29-Apr-87 22:36") |
| 97 | + (* ; "Edited 29-Apr-87 22:36") |
64 | 98 | (LET* |
65 | 99 | ((Family (FONTPROP Font 'FAMILY)) |
66 | 100 | (Face (FONTPROP Font 'FACE)) |
|
119 | 153 | (DSPSCALE NIL Stream) |
120 | 154 | 'PAINT Stream) |
121 | 155 | (CL:UNLESS UseDisplayFontBitmaps (DSPFONT Font Stream)) |
122 | | - (for YPosition from (TIMES 9 InchesToPrinterUnits) by (MINUS YCellSpacing) as YCounter |
123 | | - from 0 to 15 bind (CharacterCode _ 0) |
| 156 | + (for XPosition from (TIMES 0.75 InchesToPrinterUnits) by XCellSpacing as XCounter from 0 |
| 157 | + to 15 bind (CharacterCode _ 0) |
| 158 | + [RangedCodesStreamType _ (MEMB (IMAGESTREAMTYPE Stream) |
| 159 | + '(DISPLAY INTERPRESS] |
124 | 160 | do |
125 | | - (for XPosition from (TIMES 0.75 InchesToPrinterUnits) by XCellSpacing as XCounter |
| 161 | + (for YPosition from (TIMES 9 InchesToPrinterUnits) by (MINUS YCellSpacing) as YCounter |
126 | 162 | from 0 to 15 |
127 | 163 | do [LET ((CCode (IPLUS (ITIMES CharacterSet 256) |
128 | 164 | CharacterCode))) |
|
137 | 173 | RelativeDescent)) |
138 | 174 | ImWidth ImHeight 'INPUT 'REPLACE)) |
139 | 175 | else (if (AND (NEQ CharacterCode (CHARCODE FF)) |
140 | | - (if (MEMB (IMAGESTREAMTYPE Stream) |
141 | | - '(DISPLAY INTERPRESS)) |
| 176 | + (if RangedCodesStreamType |
142 | 177 | then (OR (AND (IGREATERP CharacterCode 31) |
143 | 178 | (ILESSP CharacterCode 127)) |
144 | 179 | (AND (IGREATERP CharacterCode 160) |
|
185 | 220 | FONT) |
186 | 221 | ) |
187 | 222 | (DECLARE%: DONTCOPY |
188 | | - (FILEMAP (NIL (657 9580 (FontSample 667 . 2302) (FontSampleFaked 2304 . 3113) (FontTable 3115 . 9578)) |
189 | | -))) |
| 223 | + (FILEMAP (NIL (655 12170 (FontSample 665 . 4700) (FontSampleFaked 4702 . 5524) (FontTable 5526 . 12168 |
| 224 | +))))) |
190 | 225 | STOP |
0 commit comments