72 lines
12 KiB
Plaintext
72 lines
12 KiB
Plaintext
Medley MEDLEYFONTFORMAT
|
||
2
|
||
|
||
4
|
||
|
||
1
|
||
|
||
MEDLEYFONTFORMAT
|
||
1
|
||
|
||
4
|
||
|
||
By: Ron Kaplan
|
||
This document last edited on May 25, 2025.
|
||
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. A single character set can be stored in a medleyfont file, but several or all of the character sets for a given font can be stored in one file. In that case 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 CHARSETNOS OTHERFONTPROPS) [Function]
|
||
FONT is either a FONTDESCRIPTOR or the typical list specification of a font. Enough information is written to FILE so that MEDLEYFONT.READ.FONT can reconstitute the in-core properties of FONT. The information for all of FONT's current character sets will be written if CHARSETNOS is not provided or is ALL, otherwise the information about just the specified 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.
|
||
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). If CHARSETNOS specifies a single character set (e.g. 0), that will be indicated by appending -C followed by the charset number to the name of the file, according to the old conventions Otherwise the default file name will have no character set indicator.
|
||
Thus, the file name produced by (MEDLEYFONT.WRITE.FONT '(CLASSIC 8)) will beÿÿ |