TSFont.mesa
last edited by Michael Plass, November 2, 1982 10:07 am
Last Edited by: Beach, May 24, 1983 9:07 am
DIRECTORY TSTypes, TSFontTable, TSGlue, Tfm, Rope;
TSFont: CEDAR DEFINITIONS =
BEGIN OPEN TSTypes;
FontNotFound: SIGNAL [name: Rope.ROPE] RETURNS [substituteName: Rope.ROPE];
TooManyFonts: SIGNAL;
Reset: PROCEDURE; -- clears the font tables
Ref: TYPE = REF FontRec;
FontRec:
TYPE =
RECORD
[size: Dimn,
rotation: INTEGER,
spaceGlue: TSGlue.Glue,
bc, ec: CHAR,
metrics: REF MetricSequenceRec,
graphics: REF ANY ← NIL,
fontTable: TSFontTable.Ref];
MetricSequenceRec:
TYPE =
RECORD [
SEQUENCE length: NAT OF MetricRec
];
MetricRec:
TYPE =
RECORD [
width, height, depth: TSTypes.Dimn
];
Lookup:
PROCEDURE
[name:Rope.
ROPE,
-- name of a Tfm file
size:Dimn ← nilDimn,
rotation: INTEGER ← 0]
RETURNS [Ref];
ParcFontSpecification:
PROCEDURE [f:Ref]
RETURNS [family: Rope.
ROPE,
micaSize: NAT,
face: [0..255],
rotation: INTEGER];
CharDimensions: PROCEDURE [Ref, CHAR] RETURNS [TSTypes.Dimensions];
Width: PROCEDURE [Ref, CHAR] RETURNS [TSTypes.Dimn];
CharItalicCorr: PROCEDURE [Ref, CHAR] RETURNS [TSTypes.Dimn];
SpaceGlue: PROCEDURE [Ref] RETURNS [TSGlue.Glue];
LigType: TYPE = {none, lig, krn};
LigInfo:
TYPE =
RECORD
[
SELECT type:LigType
FROM
none => NULL,
lig => [char: CHAR],
krn => [kern: Dimn],
ENDCASE];
Ligature: PROCEDURE[Ref, CHAR, CHAR] RETURNS [LigInfo];
TexFont: PROGRAM;
END.
Michael Plass, September 7, 1982 3:27 pm. Added Width[], revised format of FontRec to save scaled widths;
Michael Plass, November 2, 1982 10:08 am. CEDARized.