-- texfontdefs.mesa

-- last edited by Doug Wyatt, January 19, 1980  3:35 PM

DIRECTORY
	TexDefs: FROM "TexDefs",
	TexGlueDefs: FROM "TexGlueDefs",
	TfmDefs: FROM "TfmDefs";

TexFontDefs: DEFINITIONS =
BEGIN OPEN TexDefs;

FontProblem: SIGNAL; -- some inconsistency detected

CharWd,CharHt,CharDp,CharIc: PROCEDURE[FChar] RETURNS[Dimn];

LigType: TYPE = {none, lig, krn};
LigInfo: TYPE = RECORD
	[
	SELECT COMPUTED LigType FROM
		none => NULL,
		lig => [char: Char],
		krn => [kern: Dimn],
		ENDCASE
	];
Ligature: PROCEDURE[FChar, Char] RETURNS[type: LigType, info: LigInfo];

LargerType: TYPE = {none, nextlarger, extensible};
LargerInfo: TYPE = RECORD
	[
	SELECT COMPUTED LargerType FROM
		none => NULL, -- there is no larger character
		nextlarger => [next: Char], -- code of the next larger character
		extensible => [index: ExtInfo], -- index into extension info
		ENDCASE
	];
ExtInfo: TYPE = RECORD[font: Font, index: [0..177B]];

NextLarger: PROCEDURE[FChar] RETURNS[type: LargerType, info: LargerInfo];

ExtChar: TYPE = RECORD[present: BOOLEAN, char: FChar];
ExtPart: TYPE = {top,mid,bot,ext};
ExtArray: TYPE = ARRAY ExtPart OF ExtChar;
ExtensionInfo: PROCEDURE[ExtInfo] RETURNS[ExtArray];

FontHdr: PROCEDURE[Font] RETURNS[POINTER TO TfmDefs.FontHeader];
FontGlue: PROCEDURE[Font] RETURNS[TexGlueDefs.GluePtr];

FontParType: TYPE = {slant,xheight,quad,extraspace};
FontPar: PROCEDURE[Font, FontParType] RETURNS[Dimn]; -- works for any font

SyParType: TYPE = {mathspace,num1,num2,num3,denom1,denom2,
	sup1,sup2,sup3,sub1,sub2,supdrop,subdrop,delim1,delim2,axisheight};
SyPar: PROCEDURE[Font, SyParType] RETURNS[Dimn]; -- symbol fonts only

ExParType: TYPE = {defaultrulethickness,bigopspacing1,
	bigopspacing2,bigopspacing3,bigopspacing4,bigopspacing5};
ExPar: PROCEDURE[Font, ExParType] RETURNS[Dimn]; -- mathex fonts only

ReadFontInfo: PROCEDURE[name: STRING, f: Font];
FontDefined: PROCEDURE[Font] RETURNS[BOOLEAN];

TexFont: PROGRAM;

END.