Skip to content

Commit d5cc219

Browse files
authored
NSDISPLAYSIZES: A better attempt at TERMINAL and TITAN (#1655)
This now builds in knowledge of which Titan and Terminal fonts actually exist, so it doesn't try to increase the size to a black hole. Still a hack, but there are so many MOVD's involved that it is really hard to see how to do it with a generic FIND-NEXT-LARGEST-FONT.
1 parent a1a99c0 commit d5cc219

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

lispusers/NSDISPLAYSIZES

Lines changed: 23 additions & 16 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 "26-Dec-2023 21:17:15" {WMEDLEY}<lispusers>NSDISPLAYSIZES.;3 8449
3+
(FILECREATED " 8-Apr-2024 11:48:01" {WMEDLEY}<lispusers>NSDISPLAYSIZES.;4 8919
44

55
:EDIT-BY rmk
66

77
:CHANGES-TO (FNS NSDISPLAYSIZE)
88

9-
:PREVIOUS-DATE "24-Dec-2023 13:50:41" {WMEDLEY}<lispusers>NSDISPLAYSIZES.;2)
9+
:PREVIOUS-DATE "26-Dec-2023 21:17:15" {WMEDLEY}<lispusers>NSDISPLAYSIZES.;3)
1010

1111

1212
(PRETTYCOMPRINT NSDISPLAYSIZESCOMS)
@@ -30,13 +30,16 @@
3030
(DEFINEQ
3131

3232
(NSDISPLAYSIZE
33-
[LAMBDA (FAMILY SIZE FACE EXTENSION) (* ; "Edited 26-Dec-2023 21:15 by rmk")
33+
[LAMBDA (FAMILY SIZE FACE EXTENSION) (* ; "Edited 8-Apr-2024 11:47 by rmk")
34+
(* ; "Edited 26-Dec-2023 21:15 by rmk")
3435
(* ; "Edited 24-Dec-2023 13:49 by rmk")
3536
(* ; "Edited 14-Sep-96 09:32 by rmk:")
3637
(* ; "Edited 16-Nov-95 10:08 by ")
3738
(* ; "Edited 5-Mar-93 18:12 by kaplan")
3839
(* ; "Edited 15-Jan-87 15:22 by bvm:")
3940

41+
(* ;; "What we really want for small NS font sizes (12 or below) is the next larger existing font, not a built-in knowledge here of what exists.")
42+
4043
(* ;; "Returns size that we would prefer to see the font of requested family, size, face, extension. Used to make bigger ns display fonts than you would get by default. Don't do it for small screens, as on DOS and laptops.")
4144

4245
(DECLARE (GLOBALVARS DISPLAYFONTEXTENSIONS NSFONTFAMILIES))
@@ -52,17 +55,21 @@
5255
NIL)))
5356
((CL:MEMBER FAMILY NSFONTFAMILIES :TEST 'STRING-EQUAL)
5457
(* ; "Large screen, enlarge NS fonts")
55-
(AND (SELECTQ SIZE
56-
(12 (COND
57-
((CL:MEMBER FAMILY '(TERMINAL TITAN)
58-
:TEST
59-
'STRING-EQUAL) (* ; "Until these exist in size 14")
60-
12)
61-
(T 14)))
62-
(10 12)
63-
(8 10)
64-
(6 8)
65-
NIL)))
58+
(SELECTQ (U-CASE (MKATOM FAMILY))
59+
(TERMINAL (* ; "14 doesn't exist, oh well.")
60+
(CL:IF (ILEQ SIZE 10)
61+
(IPLUS SIZE 2)
62+
SIZE))
63+
(TITAN (SELECTQ SIZE
64+
(6 9)
65+
(9 10)
66+
(10 12)
67+
(CL:IF (ILESSP SIZE 6)
68+
6
69+
SIZE)))
70+
(CL:IF (ILEQ SIZE 12)
71+
(IPLUS SIZE 2)
72+
SIZE)))
6673
((AND NIL (CL:MEMBER EXTENSION INTERPRESSFONTEXTENSIONS :TEST 'STRING-EQUAL)
6774
(STRING-EQUAL FAMILY 'SYMBOL)) (* ;
6875
 "Fake NS size on Interpress printing, even tho display fonts don't exist")
@@ -160,7 +167,7 @@
160167
(VKBD.FIX.FONT)
161168
)
162169
(DECLARE%: DONTCOPY
163-
(FILEMAP (NIL (1522 6781 (NSDISPLAYSIZE 1532 . 4079) (NS\FONTFILENAME 4081 . 4322) (
164-
NS\FONTFILENAME.OLD 4324 . 4573) (PURGENSFONTS 4575 . 6779)) (6993 8031 (VKBD.FIX.FONT 7003 . 8029))))
170+
(FILEMAP (NIL (1522 7251 (NSDISPLAYSIZE 1532 . 4549) (NS\FONTFILENAME 4551 . 4792) (
171+
NS\FONTFILENAME.OLD 4794 . 5043) (PURGENSFONTS 5045 . 7249)) (7463 8501 (VKBD.FIX.FONT 7473 . 8499))))
165172
)
166173
STOP

lispusers/NSDISPLAYSIZES.LCOM

5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)