This PR contains a large number of changes in support of the implementation of the Medley Dsplay Fon file format. The changes are documented in the docs/internal/FONTCHANGES.TEDIT file.
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. If FILE is not provided, the name of the file will be constructed from the properties of the FONT.
|
||
By default, medley-format display fonts will be written in the new subdirectory fonts>medleydisplayfonts (added to DISPLAYFONTDIRECTORIES) with the default extension MEDLEYDISPLAYFONT (added to DISPLAYFONTEXTENSIONS). At least temporarily, that allows setting up different access priorities for new and old formats. 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. Otherwise the default file name will have no character set indicator.
|
||
Thus, the file name produced by (MEDLEYFONT.WRITE.FONT '(CLASSIC 8) NIL 0) will beÿÿ |