StrikeFontFormat.mesa
Copyright Ó 1984, 1985, 1987, 1988, 1991 Xerox Corporation. All rights reserved.
Michael Plass, February 11, 1988 11:13:09 am PST
Doug Wyatt, March 7, 1985 2:09:55 pm PST
PlainStrike: TYPE ~ MACHINE DEPENDENT RECORD [
header: Header, -- header.kerned~F
body: Body -- the strike body
];
KernedStrike: TYPE ~ MACHINE DEPENDENT RECORD [
header: Header, -- header.kerned~T
box: BoundingBox, -- the font bounding box
body: Body, -- the strike body
wtable: WTable -- table of widths and offsets [header.max-header.min+2 words]
];
Card16: TYPE ~ Basics.HWORD; -- big-endian 16-bit unsigned number
Int16:
TYPE ~ Basics.
HWORD;
-- big-endian 16-bit signed number
Flag: TYPE ~ MACHINE DEPENDENT {F(0), T(1)};
Header:
TYPE ~
MACHINE
DEPENDENT
RECORD [
oneBit(0:0..0): Flag, -- always T
index(0:1..1): Flag, -- F for simple strike, T for strike index
fixed(0:2..2): Flag, -- T if all characters have same width
kerned(0:3..3): Flag, -- T if Kerned, F if Plain
unused(0:4..15): [0..7777B], -- should be 0
min(0:16..31), max(0:32..47): Card16, -- minimum, maximum character codes
maxwidth(0:48..63): Card16 -- maximum spacing width of any character
];
BoundingBox:
TYPE ~
MACHINE
DEPENDENT
RECORD [
fbbox(0:0..15), fbboy(0:16..31): Int16, -- bounding box offsets
fbbdx(0:32..47), fbbdy(0:48..63): Int16 -- bounding box size
];
Body:
TYPE ~
MACHINE
DEPENDENT
RECORD [
length(0:0..15): Card16, -- number of words in strike body
ascent(0:16..31): Int16, -- scanlines above the baseline
descent(0:32..47): Int16, -- scanlines below the baseline
xoffset(0:48..63): Int16, -- always 0 (obsolete)
raster(0:64..79): Card16, -- number of words per scanline in the strike
pad(0:80..95): Card16 -- pad to multiple of 32 bits (not in file)
followed by bitmap [raster*(ascent+descent) 16-bit words] (overlap with pad)
followed by XTable [header.max-header.min+3 16-bit words]
];
byteSizeBody:
NAT ~
BYTES[Body]-
BYTES[Card16];
XTable: TYPE ~ MACHINE DEPENDENT RECORD [PACKED SEQUENCE COMPUTED CARDINAL OF Card16];
WidthEntry: TYPE ~ MACHINE DEPENDENT RECORD[offset, width: BYTE];
nullWidthEntry: WidthEntry ~ [377B, 377B];
WTable: TYPE ~ MACHINE DEPENDENT RECORD[PACKED SEQUENCE COMPUTED CARDINAL OF WidthEntry];