Field | Size of the field in nibbles | Example |
Header CCB20 | 5 | CCB20 |
Size (without the header, in nibbles) | 5 | D1010 |
Height of the font (pixels) | 2 | #hh |
ID of the font | 2 | #ff |
Numbers of chars for the name of the font(1) | 2 | #nn |
Name of the font (ascii chars) | 2*#nn | 84F6D65627 for "Homer" |
Numbers of chars for the name of the font | 2 | #nn |
The font itself(2) | 4096 |
All numbers (#hh, #ff, #nn) should be in reversed hex, because the Saturn processor reverses the nibbles of each field when it reads them. For example, if you wanted a 25-character name, you would convert 25 to hex, get #19h, and would type 91 in your string. Be careful if you change the length of the name, you must also adjust the length of the font object (#101Dh for system fonts).
Only the fonts that are stored in HOME or in port 0 are displayed in the TOOL/Style/FONT menu. These fonts must have different ID numbers (if you want to be able to use several of them in a string).
(1) This information is repeated. My 49 with rom C-1.10 doesn't display fonts that have a name that is shorter than eight characters. If the first #nn is not the same as the second one, the choose box of TOOL/Style/FONT will probably display garbage.
(2) The code is the same as the one used for grobs. Each character is described as eight lines of eight pixels, what means eight times two nibbles. The bits inside each nibble are reversed, and obviously the last two bits of the second nibbles are supposed to be zeroes (if they aren't they will be displayed, which won't make the font look good).
#hh: this should be between 1 and 8, and to get something readable, between 6 and 8.
#ff: this is what will be displayed when the font is on the stack: Ft<#hh>_<#ff>:<name>
User type: 30
Ck&dispatch type: #CF