ImagerFontCache.mesa
Michael Plass, June 21, 1983 8:58 am
DIRECTORY
UnifiedFonts USING [Key]
;
ImagerFontCache: CEDAR DEFINITIONS ~ BEGIN
FontCache: TYPE ~ REF FontCacheRep;
FontCacheRep: TYPE;
FontCode: TYPE ~ RECORD [key: CARDINAL];
FontFileCode: TYPE ~ UnifiedFonts.Key;
Create:
PROC
RETURNS [FontCache];
Makes a new font cache.
GetFontCode:
PROC [r0, r1, r2, r3, r4, r5:
REAL, fontFileCode: FontFileCode]
RETURNS [FontCode];
Makes a new font code. FontCodes are unique across all FontCaches. The real numbers may be used to represent a transformation, and fontFileCode identifies the soruce of the untransformed font.
InterpretFontCode:
PROC [fontCode: FontCode]
RETURNS [r0, r1, r2, r3, r4, r5:
REAL, fontFileCode: FontFileCode];
May raise:
InvalidFontCode: ERROR;
Flush:
PROC [fontFileCode: FontFileCode];
Invalidates all FontCodes that refer to the given fontFileCode.
GetCharData:
PROC [fontCache: FontCache, fontCode: FontCode, char:
CHAR]
RETURNS [
REF];
For getting the REF data associated with a given character in a given font. If the REF is not present, will raise the following signal:
CacheMiss: SIGNAL;
LoadCharData:
PROC [fontCache: FontCache, fontCode: FontCode, char:
CHAR, data:
REF];
For preloading the cache.
END.