TfmReader.mesa
Definition of font metric table format
Last changed by Michael Plass, October 21, 1982 11:16 am
These formats echo the Tfm formats, but with everything converted to an internal representation.
DIRECTORY Tfm, Rope;
TfmReader: DEFINITIONS =
BEGIN
Byte: TYPE = [0..377B];
MetricTable: TYPE = REF MetricTableRec;
MetricTableRec:
TYPE =
RECORD [
entry: SEQUENCE length:NAT OF REAL
];
Ref: TYPE = REF Record;
Record:
TYPE =
RECORD [
name: Rope.ROPE, -- name of the Tfm file
headerInfo: HeaderInfo, -- information from the header
bc: CHAR, -- first character code in font
ec: CHAR, -- last character code in font
fInfoTable: FInfoTable,
widthTable: MetricTable,
heightTable: MetricTable,
depthTable: MetricTable,
charIcTable: MetricTable,
ligKernProgram: LigKernProgram,
kernTable: MetricTable,
extTable: ExtTable,
parameters: ParamTable
];
HeaderInfo: TYPE = REF HeaderInfoRec;
HeaderInfoRec:
TYPE =
RECORD [
checkSum: Tfm.Word, -- identifies the version of the font
characterCodingScheme: Rope.ROPE,
family: Rope.ROPE,
designSize: REAL, -- In printer's points (72.27 per inch)
face: Byte
];
FInfoTable: TYPE = REF FInfoTableRec;
FInfoTableRec:
TYPE =
RECORD [
entry: SEQUENCE length:NAT OF FInfoEntry
];
FInfoTag: TYPE = Tfm.FInfoTag;
FInfoEntry: TYPE = Tfm.FInfoEntry;
The LigKern table contains instructions for a simple machine that decides how to treat special letter pairs.
LigKernProgram: TYPE = REF LigKernProgramRec;
LigKernProgramRec:
TYPE =
RECORD [
step: SEQUENCE length:NAT OF LigKernStep
];
LigOrKern: TYPE = Tfm.LigOrKern;
LigKernStep: TYPE = Tfm.LigKernEntry;
ExtTable: TYPE = REF ExtTableRec;
ExtTableRec: TYPE; -- Extensible characters are not supported.
ParamTable: TYPE = REF ParamTableRec;
ParamTableRec:
TYPE =
RECORD [
slantNum, slantDenom: LONG INTEGER,
entry: SEQUENCE length:Tfm.ParamIndex OF REAL
];
Load: PROCEDURE [name: Rope.ROPE] RETURNS [Ref];
END.
Michael Plass, October 21, 1982 11:17 am. Renamed from TSFontTable.