SetUpFont:
PUBLIC
PROCEDURE [ip: Handle, fontNumber: IPVariables.FrameVariable, name: Rope.
ROPE, scale: Number, rotation: Number ← int[0], putInFrame:
BOOLEAN ←
TRUE] = {
ip.AppendHierarchicalName[name];
ip.AppendOp[findfont];
ip.Scale[s: scale, concatT: FALSE];
IF
NOT NumberIsZero[rotation]
THEN {
ip.Rotate[alpha: rotation, concatT: FALSE];
ip.AppendOp[concat];
};
ip.AppendOp[modifyfont];
IF putInFrame
THEN {
ip.AppendInteger[fontNumber];
ip.AppendOp[fset];
};
};
AppendHierarchicalName:
PUBLIC
PROCEDURE [ip: Handle, name: Rope.
ROPE, start:
INT ← 0, len:
INT ← Rope.MaxLen] = {
first: INT ← start;
pos: INT;
length: INT ← MIN[len, Rope.Length[name]-start];
identifierCount: INT ← 1;
break down heirarchical name into a MAKEVEC of identifiers
WHILE (pos ← name.Find[s2: "/", pos1: first, case:
FALSE]) # -1
DO
ip.AppendIdentifier[id: name, start: first, len: pos-first];
identifierCount ← identifierCount+1;
first ← pos+1;
ENDLOOP;
ip.AppendIdentifier[id: name, start: first, len: length-first];
ip.MakeVec[identifierCount];
};