There is no doubt that the users, the package implementers, and the FR80 systems programmers may all have different views on what character fonts should be. Discussions in the past have been made artificially simple by asking all parties addressing to a 'black box' (the font library) with no reference at all to its contents (the fonts). This paper is an attempt to look at it in greater detail. The discussion is informal aided by a few fast and hard rules in the appearance.
We would like to see the fonts in logical levels, with particular emphasis on level 3 which is tailored to satisfy the FR80 requirements.
A font is a string of symbols, for example a b c d ...
A font is a sequence of the following pairs (a) a character code and (b) a definition, and perhaps preceded by information about the characteristics of the font being defined. For example, see diagram 1.
A font is a sequence of the following triples (a) an address, (b) a word count and (c) a list of numbers each consists of 6 octal digits, for example, see diagram 2.
Representations of level 3 (in fact it is true for all levels) are very much affected by the medium it is stored in. We shall isolate the following cases (to avoid using the word number with different meanings in various contexts, we shall call numbers shown in diagram 2 as tokens):
as shown in diagram 2.
a token, say '123456', may be stored as one character per word using 6 words or 2 characters per word using 3 words. (It may not be possible to store itas a binary number using one word because the size of a word may not be big enough to hold the number).
a token is regarded as a binary number of 18 bits (preceded by 0s if necessary) split into 3 bytes each of 6 bits and stored consecutively on tape.
a token is stored as a binary number in one memory word on the FR80.
With levels and representations defined above, we shall be able to define a font library as:
a class of objects which are the disk file representation of the fonts viewed at level-3
Now we shall be able to see that to transfer a 'font' from the font library to the FR80 is a series of mappings from one representation to another. And particularly, we identify that a package which provides font canging facilities should be able to perform the mappings from (3b) to (3c) and on the other hand DRIVER is responsible for the mappings from (3c) to (3d). A utility program (independent from any packages) is desirable to map (3b) to (3a) for display or documentation purposes.
We shall not go into any detail on this apart from saying that a program exists on Prime P400 which maps a disk-file representation of level-2 into a disk file representation of level-3. the program is arranged such that if information about the characteristics of the font being defined is not available, default values will be generated.
This paper attempts to describe a font library in terms of levels of conception and representation within a level. In doing so, we are able to identify 'who shall do what' in providing the font changing facilities.
* H=14 * A=0 W=10 /101 721417 123361 212674 270000 /102 632112 761523 143736 347633 752726 762730 763276 337014 000000 /103 211237 731476 151776 217622 762575 267315 217026 000000
000067 777776 007012 000400 040020 777760 400007 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040040 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040060 777760 400005 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040100 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040120 777760 400010 040422 040431 040445 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040140 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040160 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040200 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040220 777760 400007 400010 400010 400001 400010 400010 400010 400010 400010 400010 400003 400010 400010 400010 400010 400002 040240 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400006 040260 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040300 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040320 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040340 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040360 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 040400 777760 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400010 400000 040420 777760 000000 000000 000101 721417 123361 212674 270000 000000 000000 000102 632112 761573 143736 347633 752726 762730 040440 777762 763276 337014 000000 000000 000000 000103 211237 731476 151776 217622 762575 267315 217026 000000 740040
260000+n load font from tape to core
100<=n<=777 and is the font number.
The command should be followed immediately by the font definition which should be terminated by 260000.
code sequence 260000+n <font definition> 260000
As the new font is loaded directly to core so the current font will be replaced automatically. It is not necessary (and in fact not allowed) to use the font selection command to select fonts loaded by this method.
261000+n load font from tape to disc
100<=n<=777 and is the font number.
The command is followed immediately by the font definition which is to be terminated by 260000.
code sequence 261000+n <font definition> 260000
As the new font is copied to disc only so the current font in core will not be affected by this command. It is necessary to use the font selection command to select the new font and there is no limit on how many times it is selected.
232000 select font
This is a 2-word command and the calling sequence is:
232000 600000+n
100<=n<777 and is the font number.
the font required must be already on disc. Font numbers less than 100 are reserved for permanent fonts and the current list of permanent fonts are: OCRB (font number 2) and GPO (font number 1).
232412 specify font characteristics
This is a 2-word command and the calling sequence is:
232412 s
where s=a+h+w and:
a=0 or 400000 and is the courier angle required.
h=(number of strokes in vertical direction)*1000
w=(number of strokes in horizontal direction)
These parameters are described in Discussion paper 31)
Curly brackets around an item means that item may appear from zero to any number of times.
<L2> ::= {<information>} <definition-list> <information> ::= * <parameter-list> <parameter-list> ::= <parameter> {<parameter>} <parameter> ::= <key> = <value> <key> ::= S|H|A|W <value> ::= <number> <definition-list>::= <definition> {<definition>} <definition> ::= / <code> <command-list> <code> ::= <octal-number> <command-list> ::= <command> {<command>} <command> ::= <octal-number>
<information> is optional and it provides details about the characteristics of the font being defined, the keys are interpreted as follows:
S : number of characters to be defined A : courier angle required H : number of strokes in the vertical direction W : number of strokes in the horizontal direction
<information>, if present, must appear before the character definitions and may be in more than 1 records each begin with a '*' in the first column.
At least one <definition> must be present. Each <definition> must begin in a new record with a '/' in the first column, then followed by the character code. Each <command> is a set of 3 drawing instructions and the details of which can be found in Discussion paper 31.
<L3> ::= <triple-list> <terminate-code> <triple-list> ::= <triple> {<triple>} <triple> ::= <address> <word-count> {<word>}> <address> ::= <octal-number> <word> ::= <octal-number> <word-count> ::= <octal-number> <terminate-count> ::= 740040
The number of <word> to be present is given by <word-count> which is the 2's complement of the number required. The first <word>n will be placed in location 67 (a+h+w, see command 232412 in Appendix A) and 70 (size of dispatch table). The dispatch table and the definition will be stored from location 40020 to 57777 (about 8K).