81 lines
15 KiB
Plaintext
81 lines
15 KiB
Plaintext
Medley MEDLEYFONTFORMAT
|
||
2
|
||
|
||
4
|
||
|
||
1
|
||
|
||
MEDLEYFONTFORMAT
|
||
1
|
||
|
||
4
|
||
|
||
By: Ron Kaplan
|
||
This document last edited on April 6, 2026.
|
||
Introduction
|
||
This file implement a new Medley-specific file format for storing the information contained in an arbitrary FONTDESCRIPTOR data structure, and for reading that information into a FONTDESCRIPTOR equivalent to the original. The original can be assembled and constructed from any sources for any device, modified in memory, and then saved in the standard medleyfont format. There is information in the file for all of the character sets of the font (up to the font's MAXCHARSET), including NIL entries for character sets that are not yet instantiated in the font descriptor. The individual character sets are indexed for rapid retrieval. Reading makes use of only forward-pointing SETFILEPTRs so does not depend on random access.
|
||
Writing and reading
|
||
The function MEDLEYFONT.WRITE.FONT writes the information in an in-memory FONTDESCRIPTOR to a file, and MEDLEYFONT.READ.FONT retrieves that information.
|
||
(MEDLEYFONT.WRITE.FONT FONT FILE OTHERFONTPROPS NOINDIRECTS) [Function]
|
||
FONT is either a FONTDESCRIPTOR or a FONTSPEC. Enough information is written to FILE so that MEDLEYFONT.READ.FONT can reconstitute the in-core properties of the designated FONT. The information for all of FONT's current character sets will be written. It is expected that a Medleyfont will be complete for character sets and characters within character sets, as determined by COMPLETE.FONT and the specifications of the FONTCOERCIONS and CHARCOERCIONS font-device properties. But the format records the fact that some character sets in the font descriptor may not yet be instantiated. These are distinguished from character sets that are known to be empty and are instantiated as the slug charsetinfo.
|
||
If FILE is not provided, the name of the file will be constructed from the properties of FONT. By default it will be stored in a MEDLEYDIR subdirectory of the form fonts>medley[device]s> with an extension of the form MEDLEY[device]FONT. That subdirectory and extension are included respectively in DISPLAYFONTDIRECTORIES and DISPLAYFONTEXTENSIONS. Similar subdirectories and extensions are set up for other devices (e.g. fonts/medleypostscript/fonts).
|
||
Thus, the file name produced by (MEDLEYFONT.WRITE.FONT '(CLASSIC 8)) will beÿÿ |