diff --git a/docs/internal/MEDLEYFONTFORMAT.TEDIT b/docs/internal/MEDLEYFONTFORMAT.TEDIT index d95158bb..69323bd6 100644 --- a/docs/internal/MEDLEYFONTFORMAT.TEDIT +++ b/docs/internal/MEDLEYFONTFORMAT.TEDIT @@ -22,13 +22,15 @@ If FILE is not provided, the name of the file will be constructed from the prope Thus, the file name produced by (MEDLEYFONT.WRITE.FONT '(CLASSIC 8)) will be [MEDLEYDIR]> fonts>medleydisplayfonts>CLASSIC08-MRR.MEDLEYDISPLAYFONT. OTHERFONTPROPS can be specified as a note or other information to be written on the file for later retrieval. The coercion process in the constuction of Medley font descriptors records the fact that some character sets are exactly identical to the same character sets in other fonts. Thus there may be only one true source for all of the Japanese Kanji character sets, but other fonts may appear to have those characters by virtue of an indirect pointer. The Medley fontfile for a font with such an indirect will store that indirect relationship as the FONTSPEC of the source font, with the benefit of a substantial reduction in file size. The downside is that the source font must be accessible at when such a character set is read in. If NOINDIRECTS is true, that dependency is avoided by copying into the file the full specification of an indirect character set. -(MEDLEYFONT.READ.FONT FILE CHARSETS NOERROR) [Function] +(MEDLEYFONT.READ.FONT FILE CHARSETS NOERROR DIRECTORY) [Function] The information for CHARSETS character sets will be read from FILE into a new in-core FONTDESCRIPTOR. If CHARSETS is ALL, information for all character sets on FILE will be installed. If NIL, then only the font fields will be filled in, with no character sets (not even 0) instantiated. Character sets that are not designated by CHARSETS will be represented by NIL in the resulting font, indicating that they have not yet been instantiated. The information for indirect character sets will be retrieved from a font-file in the same directory as FILE. If FONT is provided as a FONTSPEC, the standard filename corresponding to that specification will be read. If NOERROR, MEDLEYFONT.READ.FONT returns NIL if a font cannot be read from the indicated file. +DIRECTORY is passed as the DIRECTORY argument of MEDLEYFONT.FILENAME. (MEDLEYFONT.FILENAME FILE DIRECTORY EXTENSION) [Function] -Returns a fully specified Medley font file name for FILE, a string, litatom, or FONTSPEC. If FILE is a FONTSPEC it is first translated to a standard name for that specification, with values for the directory and extension taken from DIRECTORY and/or EXTENSION, if provided, or from the FONTDEVICEPROP properties of its device. DIRECTORY and EXTENSION also provide default s if FILE is a string or atom. +Returns a fully specified Medley font file name for FILE, a string, litatom, or FONTSPEC. If FILE is a FONTSPEC it is first translated to a standard name for that specification, with values for the directory and extension taken from DIRECTORY and/or EXTENSION, if provided, or from the FONTDEVICEPROP properties of its device. DIRECTORY and EXTENSION also provide default s if FILE is a string or atom. +DIRECTORY defaults to the first of FONTDIRECTORIES for the font device. If DIRECTORY is T, the currently connected directory is used. Integration with current FONT interface (MEDLEYFONT.FILEP FILE) [Function] Returns NIL if FILE is not a medley-font file or a stream open on a medley-font file, otherwise returns a list (fullname date version otherfontprops), where fullfilename is the fullname of the file, date is the date that the file was written, version is the version-number of the medleyfont format (currently 0), and otherfontprops is the value of OTHERFONTPROPS, if any were specified when the file was created. If FILE is a stream open at the beginning of a medley-font file, the stream is left open and positioned just after its header information. @@ -68,8 +70,8 @@ Reads and advances over the item written at the current file position of STREAM. (CHARPROPS (COLOR . BLACK))/MODERN(CHARPROPS (COLOR . BLACK))/MODERN (CHARPROPS (COLOR . BLACK))/MODERN(CHARPROPS (COLOR . BLACK))3 TIMESROMAN$(CHARPROPS (COLOR . BLACK))     HRULE.GETFN  HRULE.GETFN  HRULE.GETFN  - HRULE.GETFN  HRULE.GETFN+ % IXRkSF`z t "'/|*eU 4&  E  ( ](CU 0=W  %    + HRULE.GETFN  HRULE.GETFN+ % IXRkSF`z t "'/|*eU  " 4&  E   C 4( ](CU 0=W  %    0  L?+    uCj}  { -,  BP8]  Idt(((TEDIT.LAST.FIND.STRING . "MEDLEYFONT.FILENAME") (CLEARGET) (CHARENCODING . MCCS)))PROPS:_DATE:k-#X)z \ No newline at end of file +,  BP8]  Idt(((TEDIT.LAST.FIND.STRING . "MEDLEYFONT.FILENAME") (CLEARGET) (CHARENCODING . MCCS)))PROPS:_DATE:kj$/3z \ No newline at end of file diff --git a/sources/MEDLEYFONTFORMAT b/sources/MEDLEYFONTFORMAT index fa230dd1..3c2c630b 100644 --- a/sources/MEDLEYFONTFORMAT +++ b/sources/MEDLEYFONTFORMAT @@ -1,12 +1,12 @@ (DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10) -(FILECREATED " 6-Apr-2026 09:45:18" {WMEDLEY}MEDLEYFONTFORMAT.;304 63514 +(FILECREATED "12-Apr-2026 00:46:54" {WMEDLEY}MEDLEYFONTFORMAT.;306 63906 :EDIT-BY rmk - :CHANGES-TO (FNS MEDLEYFONT.GETCHARSET MEDLEYFONT.FILENAME MEDLEYFONT.READ.FONT) + :CHANGES-TO (FNS MEDLEYFONT.READ.FONT MEDLEYFONT.FILENAME) - :PREVIOUS-DATE " 4-Apr-2026 15:29:42" {WMEDLEY}MEDLEYFONTFORMAT.;301) + :PREVIOUS-DATE " 6-Apr-2026 09:45:18" {WMEDLEY}MEDLEYFONTFORMAT.;304) (PRETTYCOMPRINT MEDLEYFONTFORMATCOMS) @@ -313,7 +313,8 @@ (DEFINEQ (MEDLEYFONT.READ.FONT - [LAMBDA (FILE CHARSETS NOERROR) (* ; "Edited 6-Apr-2026 09:07 by rmk") + [LAMBDA (FILE CHARSETS NOERROR DIRECTORY) (* ; "Edited 12-Apr-2026 00:30 by rmk") + (* ; "Edited 6-Apr-2026 09:07 by rmk") (* ; "Edited 4-Apr-2026 15:29 by rmk") (* ; "Edited 31-Mar-2026 22:53 by rmk") (* ; "Edited 30-Mar-2026 12:08 by rmk") @@ -331,7 +332,7 @@ (* ;; "Returns a font descriptor containing the requested charsets from FILE. If FILE is not given, the filename is determined from the FONTSPEC and the FONTDEVICEPROP's for its FSDEVICE.") - (SETQ FILE (MEDLEYFONT.FILENAME FILE)) + (SETQ FILE (MEDLEYFONT.FILENAME FILE DIRECTORY)) (if (NOT (INFILEP FILE)) then (CL:UNLESS NOERROR (ERROR "FILE NOT FOUND" FILE)) elseif [OR (MEMB CHARSETS '(NIL ALL)) @@ -878,7 +879,8 @@ (DEFINEQ (MEDLEYFONT.FILENAME - [LAMBDA (FILE DIRECTORY EXTENSION) (* ; "Edited 6-Apr-2026 09:31 by rmk") + [LAMBDA (FILE DIRECTORY EXTENSION) (* ; "Edited 12-Apr-2026 00:41 by rmk") + (* ; "Edited 6-Apr-2026 09:31 by rmk") (* ; "Edited 1-Apr-2026 09:46 by rmk") (* ; "Edited 30-Mar-2026 09:19 by rmk") (* ; "Edited 17-Mar-2026 10:15 by rmk") @@ -889,19 +891,21 @@ (* ; "Edited 10-Jun-2025 11:02 by rmk") (* ; "Edited 19-May-2025 17:42 by rmk") - (* ;; "Defaults to components of DIRECTORY, e.g. host/directory otherwise uses FONTDIRECTORIES for defaults") + (* ;; "Defaults to components of DIRECTORY, e.g. host/directory. Current directory if T, device directory if NIL. ") (LET (FONTSPEC HOST DIR EXT) (if (type? FONTSPEC FILE) then (SETQ FONTSPEC FILE) (SETQ FILE (\FONTFILENAME (\FONT.CHECKARGS FILE NIL NIL NIL NIL T))) else (SETQ FONTSPEC (FONTSPECFROMFILENAME FILE))) - [if DIRECTORY - then (SETQ HOST (FILENAMEFIELD DIRECTORY 'HOST)) - (SETQ DIR (FILENAMEFIELD DIRECTORY 'DIRECTORY)) - else [SETQ DIR (CAR (MKLIST (FONTDEVICEPROP FONTSPEC 'FONTDIRECTORIES] - (SETQ HOST (FILENAMEFIELD DIR 'HOST] - (PACKFILENAME 'BODY FILE 'HOST HOST 'DIRECTORY DIR 'EXTENSION + (SETQ DIRECTORY (SELECTQ DIRECTORY + (NIL (* ; "Deployed font directory") + [CAR (MKLIST (FONTDEVICEPROP FONTSPEC 'FONTDIRECTORIES]) + (T (* ; "Connected directory") + (DIRECTORYNAME T)) + DIRECTORY)) + (SETQ HOST (FILENAMEFIELD DIRECTORY 'HOST)) + (PACKFILENAME 'BODY FILE 'HOST HOST 'DIRECTORY DIRECTORY 'EXTENSION (OR EXTENSION (CAR (MKLIST (FONTDEVICEPROP FONTSPEC 'FONTEXTENSIONS]) ) @@ -953,12 +957,12 @@ ) ) (DECLARE%: DONTCOPY - (FILEMAP (NIL (2223 19438 (MEDLEYFONT.WRITE.FONT 2233 . 8636) (MEDLEYFONT.GETCHARSET 8638 . 10686) ( -MEDLEYFONT.GETCHARSET.INTERNAL 10688 . 12425) (MEDLEYFONT.CHARSET? 12427 . 13305) ( -MEDLEYFONT.GETFILEPROP 13307 . 16371) (MEDLEYFONT.FILEP 16373 . 18801) (MEDLEYFONT.FILEVERSION 18803 - . 19436)) (19464 41280 (MEDLEYFONT.READ.FONT 19474 . 22923) (MEDLEYFONT.READ.CHARSET 22925 . 27972) ( -MEDLEYFONT.READ.ITEM 27974 . 34123) (MEDLEYFONT.PEEK.ITEM 34125 . 34987) (MEDLEYFONT.READ.FONTPROPS -34989 . 35454) (MEDLEYFONT.READ.VERIFIEDFONT 35456 . 41278)) (41306 60656 (MEDLEYFONT.WRITE.CHARSET -41316 . 45955) (MEDLEYFONT.WRITE.ITEM 45957 . 55010) (MEDLEYFONT.WRITE.FONTPROPS 55012 . 59781) ( -MEDLEYFONT.WRITE.HEADER 59783 . 60654)) (60657 62629 (MEDLEYFONT.FILENAME 60667 . 62627))))) + (FILEMAP (NIL (2201 19416 (MEDLEYFONT.WRITE.FONT 2211 . 8614) (MEDLEYFONT.GETCHARSET 8616 . 10664) ( +MEDLEYFONT.GETCHARSET.INTERNAL 10666 . 12403) (MEDLEYFONT.CHARSET? 12405 . 13283) ( +MEDLEYFONT.GETFILEPROP 13285 . 16349) (MEDLEYFONT.FILEP 16351 . 18779) (MEDLEYFONT.FILEVERSION 18781 + . 19414)) (19442 41377 (MEDLEYFONT.READ.FONT 19452 . 23020) (MEDLEYFONT.READ.CHARSET 23022 . 28069) ( +MEDLEYFONT.READ.ITEM 28071 . 34220) (MEDLEYFONT.PEEK.ITEM 34222 . 35084) (MEDLEYFONT.READ.FONTPROPS +35086 . 35551) (MEDLEYFONT.READ.VERIFIEDFONT 35553 . 41375)) (41403 60753 (MEDLEYFONT.WRITE.CHARSET +41413 . 46052) (MEDLEYFONT.WRITE.ITEM 46054 . 55107) (MEDLEYFONT.WRITE.FONTPROPS 55109 . 59878) ( +MEDLEYFONT.WRITE.HEADER 59880 . 60751)) (60754 63021 (MEDLEYFONT.FILENAME 60764 . 63019))))) STOP diff --git a/sources/MEDLEYFONTFORMAT.LCOM b/sources/MEDLEYFONTFORMAT.LCOM index 533b852a..e760235f 100644 Binary files a/sources/MEDLEYFONTFORMAT.LCOM and b/sources/MEDLEYFONTFORMAT.LCOM differ