Common Lisp Package: ZPB-TTF

README:

FUNCTION

Public

Undocumented

CLOSE-FONT-LOADER (LOADER)

EXPLICIT-CONTOUR-POINTS (CONTOUR)

OPEN-FONT-LOADER (THING)

Private

ADVANCE-FILE-POSITION (STREAM N)

Move the file position of STREAM ahead by N bytes.

BOUNDED-AREF (VECTOR INDEX)

Some TrueType data vectors are truncated, and any references beyond the end of the vector should be treated as a reference to the last element in the vector.

LOAD-KERNING-FORMAT-1 (TABLE STREAM)

Return a hash table keyed on a UINT32 key that represents the glyph index in the left and right halves with a value of the kerning distance between the pair.

LOAD-UNICODE-CMAP (STREAM)

Load a Unicode character map of type 4 from STREAM starting at the current offset.

MAKE-TRANSFORMER (A B C D E F)

Given the elements of the transformation matrix specified by A, B, C, D, E, and F, return a function of two arguments that returns the arguments transformed as multiple values. Ref: http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html

NUMBER->TAG (NUMBER)

Convert the 32-bit NUMBER to a string of four characters based on the CODE-CHAR of each octet in the number.

POSTSCRIPT-NAME-CODE-POINT (NAME)

Returns, if available, the interpretation of the PostScript name NAME as a Unicode code point specifier. Ref: http://partners.adobe.com/public/developer/opentype/index_glyph.html

READ-CONTOURS-AT-INDEX (INDEX LOADER)

Read the contours at glyph index INDEX, discarding bounding box information.

READ-PSTRING (STREAM)

Read a Pascal-style length-prefixed string.

READ-SIMPLE-CONTOURS (CONTOUR-COUNT STREAM)

With the stream positioned immediately after the glyph bounding box, read the contours data from STREAM and return it as a vector.

TAG->NUMBER (TAG)

Convert the four-character string TAG to a 32-bit number based on the CHAR-CODE of each character.

TRANSFORM-CONTOURS (FN CONTOURS)

Call FN with the X and Y coordinates of each point of each contour in the vector CONTOURS. FN should return two values, which are used to update the X and Y values of each point.

Undocumented

ARRANGE-FINALIZATION (OBJECT STREAM)

AVAILABLE-CHARACTER-MAPS (LOADER)

SETFBOUNDED-AREF (NEW-VALUE VECTOR INDEX)

CHECK-VERSION (LOCATION ACTUAL &REST EXPECTED)

DUMP-COMPOUND-FLAGS (FLAGS)

EMPTY-BOUNDING-BOX

EMPTY-CONTOURS

ENCODING-ID-NAME (PLATFORM-ID ENCODING-ID)

LOAD-NAME-INFO (LOADER)

LOAD-POST-FORMAT-2 (NAMES STREAM)

LOAD-POST-FORMAT-3 (NAMES STREAM)

MACINTOSH-OCTETS-TO-STRING (OCTETS)

MAKE-CONTROL-POINT (X Y ON-CURVE-P)

MERGE-CONTOURS (CONTOURS-LIST)

NAME-IDENTIFIER-ID (SYMBOL)

OPEN-FONT-LOADER-FROM-FILE (THING)

OPEN-FONT-LOADER-FROM-STREAM (INPUT-STREAM)

PLATFORM-ID-NAME (PLATFORM-ID)

POSTSCRIPT-UNI-NAME-P (NAME)

READ-COMPOUND-CONTOURS (LOADER)

READ-FIXED (STREAM)

READ-FIXED2.14 (STREAM)

READ-FWORD (STREAM)

READ-INT16 (STREAM)

READ-INT8 (STREAM)

READ-POINTS-VECTOR (STREAM FLAGS COUNT AXIS)

READ-UINT16 (STREAM)

READ-UINT32 (STREAM)

READ-UINT8 (STREAM)

TRANSFORM-OPTION-COUNT (FLAGS)

UNICODE-OCTETS-TO-STRING (OCTETS)

MACRO

Public

DO-CONTOUR-SEGMENTS ((P0 P1 P2) CONTOUR &BODY BODY)

A contour is made up of segments. A segment may be a straight line or a curve. For each segment, bind the P0 and P2 variables to the start and end points of the segment. If the segment is a curve, set P1 to the control point of the curve, otherwise set P1 to NIL.

Undocumented

DO-CONTOUR-SEGMENTS* ((P1 P2) CONTOUR &BODY BODY)

DO-CONTOURS ((CONTOUR OBJECT &OPTIONAL RESULT) &BODY BODY)

WITH-FONT-LOADER ((LOADER FILE) &BODY BODY)

GENERIC-FUNCTION

Public

FIND-GLYPH (CHARACTER FONT-LOADER)

Find the glyph object for CHARACTER in FONT-LOADER and return it. If CHARACTER is an integer, treat it as a Unicode code point. If CHARACTER is a Lisp character, treat its char-code as a Unicode code point.

INDEX-GLYPH (INDEX FONT-LOADER)

Return the GLYPH object located at glyph index INDEX in FONT-LOADER, or NIL if no glyph is defined for that index. Despite the name, NOT the inverse of GLYPH-INDEX.

Undocumented

ADVANCE-WIDTH (OBJECT)

SETFADVANCE-WIDTH (NEW-VALUE GLYPH)

ALL-KERNING-PAIRS (FONT-LOADER)

CONTOUR (OBJECT IDEX)

CONTOUR-COUNT (OBJECT)

FAMILY-NAME (FONT-LOADER)

FIND-NAME-ENTRY (PLATFORM-ID ENCODING-ID LANGUAGE-ID NAME-ID FONT-LOADER)

FULL-NAME (FONT-LOADER)

GLYPH-EXISTS-P (CHARACTER FONT-LOADER)

KERNING-OFFSET (LEFT RIGHT LOADER)

LEFT-SIDE-BEARING (OBJECT)

SETFLEFT-SIDE-BEARING (NEW-VALUE GLYPH)

NAME-ENTRY-VALUE (NAME-DESIGNATOR FONT-LOADER)

POSTSCRIPT-NAME (FONT-LOADER)

RIGHT-SIDE-BEARING (OBJECT)

STRING-BOUNDING-BOX (STRING LOADER &KEY KERNING (KERNING T))

SUBFAMILY-NAME (FONT-LOADER)

VALUE (NAME-ENTRY)

XMAX (OBJECT)

SETFXMAX (NEW-VALUE OBJECT)

XMIN (OBJECT)

SETFXMIN (NEW-VALUE OBJECT)

YMAX (OBJECT)

SETFYMAX (NEW-VALUE OBJECT)

YMIN (OBJECT)

SETFYMIN (NEW-VALUE OBJECT)

Private

CODE-POINT-FONT-INDEX (CODE-POINT FONT-LOADER)

Return the index of the Unicode CODE-POINT in FONT-LOADER, if present, otherwise NIL.

FONT-INDEX-CODE-POINT (GLYPH-INDEX FONT-LOADER)

Return the code-point for a given glyph index.

Undocumented

%ACTUAL-VALUE (CONDITION)

%EXPECTED-VALUES (CONDITION)

ACTUAL-VALUE (CONDITION)

SETFACTUAL-VALUE (NEW-VALUE CONDITION)

DATA-SIZE (OBJECT)

DESCRIPTION (CONDITION)

SETFDESCRIPTION (NEW-VALUE CONDITION)

EXPECTED-VALUES (CONDITION)

SETFEXPECTED-VALUES (NEW-VALUE CONDITION)

GLYPH-LENGTH (INDEX FONT-LOADER)

GLYPH-LOCATION (INDEX FONT-LOADER)

HORIZONTAL-METRICS-COUNT (FONT-LOADER)

INITIALIZE-BOUNDING-BOX (GLYPH)

INITIALIZE-CONTOURS (GLYPH)

INITIALIZE-NAME-ENTRY (NAME-ENTRY)

INVERT-CHARACTER-MAP (FONT-LOADER)

KERNED-ADVANCE-WIDTH (OBJECT NEXT)

LOAD-CMAP-INFO (FONT-LOADER)

LOAD-HEAD-INFO (FONT-LOADER)

LOAD-HHEA-INFO (FONT-LOADER)

LOAD-HMTX-INFO (FONT-LOADER)

LOAD-KERN-INFO (FONT-LOADER)

LOAD-KERNING-SUBTABLE (FONT-LOADER FORMAT)

LOAD-LOCA-INFO (FONT-LOADER)

LOAD-MAXP-INFO (FONT-LOADER)

LOAD-POST-INFO (FONT-LOADER)

LOCATION (OBJECT)

SETFLOCATION (NEW-VALUE CONDITION)

OCTETS (NAME-ENTRY)

SEEK-TO-TABLE (TAG FONT-LOADER)

SETFSIZE (NEW-VALUE CONDITION)

TABLE-EXISTS-P (TAG FONT-LOADER)

TABLE-INFO (TAG FONT-LOADER)

TABLE-POSITION (TAG FONT-LOADER)

TABLE-SIZE (TAG FONT-LOADER)

SLOT-ACCESSOR

Public

FONT-INDEX (OBJECT)

The index of this glyph within the font file, used to look up information in various structures in the truetype file.

SETFFONT-INDEX (NEW-VALUE OBJECT)

The index of this glyph within the font file, used to look up information in various structures in the truetype file.

Undocumented

ASCENDER (OBJECT)

SETFASCENDER (NEW-VALUE OBJECT)

BOUNDING-BOX (OBJECT)

SETFBOUNDING-BOX (NEW-VALUE OBJECT)

CODE-POINT (OBJECT)

SETFCODE-POINT (NEW-VALUE OBJECT)

CONTOURS (OBJECT)

SETFCONTOURS (NEW-VALUE OBJECT)

DESCENDER (OBJECT)

SETFDESCENDER (NEW-VALUE OBJECT)

FIXED-PITCH-P (OBJECT)

SETFFIXED-PITCH-P (NEW-VALUE OBJECT)

GLYPH-COUNT (OBJECT)

SETFGLYPH-COUNT (NEW-VALUE OBJECT)

ITALIC-ANGLE (OBJECT)

SETFITALIC-ANGLE (NEW-VALUE OBJECT)

LINE-GAP (OBJECT)

SETFLINE-GAP (NEW-VALUE OBJECT)

ON-CURVE-P (OBJECT)

UNDERLINE-POSITION (OBJECT)

SETFUNDERLINE-POSITION (NEW-VALUE OBJECT)

UNDERLINE-THICKNESS (OBJECT)

SETFUNDERLINE-THICKNESS (NEW-VALUE OBJECT)

UNITS/EM (OBJECT)

SETFUNITS/EM (NEW-VALUE OBJECT)

SETFVALUE (NEW-VALUE OBJECT)

X (OBJECT)

SETFX (NEW-VALUE OBJECT)

Y (OBJECT)

SETFY (NEW-VALUE OBJECT)

Private

FONT-LOADER (OBJECT)

The font-loader from which this glyph originates.

INPUT-STREAM (OBJECT)

The stream from which things are loaded.

SETFINPUT-STREAM (NEW-VALUE OBJECT)

The stream from which things are loaded.

OFFSET (OBJECT)

The octet offset within the TrueType file stream of the entry's data. *Not* the same as the offset in the NameRecord structure, which is relative to the start of the string data for the table.

SETFOFFSET (NEW-VALUE OBJECT)

The octet offset within the TrueType file stream of the entry's data. *Not* the same as the offset in the NameRecord structure, which is relative to the start of the string data for the table.

Undocumented

%OCTETS (OBJECT)

%VALUE (OBJECT)

ADVANCE-WIDTHS (OBJECT)

SETFADVANCE-WIDTHS (NEW-VALUE OBJECT)

CHARACTER-MAP (OBJECT)

SETFCHARACTER-MAP (NEW-VALUE OBJECT)

ENCODING-ID (OBJECT)

SETFENCODING-ID (NEW-VALUE OBJECT)

END-CODES (OBJECT)

ENTRY-LENGTH (OBJECT)

SETFENTRY-LENGTH (NEW-VALUE OBJECT)

SETFFONT-LOADER (NEW-VALUE OBJECT)

GLYPH-CACHE (OBJECT)

SETFGLYPH-CACHE (NEW-VALUE OBJECT)

GLYPH-INDEXES (OBJECT)

SETFGLYPH-INDEXES (NEW-VALUE OBJECT)

GLYPH-LOCATIONS (OBJECT)

SETFGLYPH-LOCATIONS (NEW-VALUE OBJECT)

ID-DELTAS (OBJECT)

ID-RANGE-OFFSETS (OBJECT)

INVERSE-CHARACTER-MAP (OBJECT)

SETFINVERSE-CHARACTER-MAP (NEW-VALUE OBJECT)

KERNING-TABLE (OBJECT)

SETFKERNING-TABLE (NEW-VALUE OBJECT)

LANGUAGE-ID (OBJECT)

SETFLANGUAGE-ID (NEW-VALUE OBJECT)

LEFT-SIDE-BEARINGS (OBJECT)

SETFLEFT-SIDE-BEARINGS (NEW-VALUE OBJECT)

LOCA-OFFSET-FORMAT (OBJECT)

SETFLOCA-OFFSET-FORMAT (NEW-VALUE OBJECT)

NAME (OBJECT)

NAME-ENTRIES (OBJECT)

SETFNAME-ENTRIES (NEW-VALUE OBJECT)

NAME-ID (OBJECT)

SETFNAME-ID (NEW-VALUE OBJECT)

SETFOCTETS (NEW-VALUE OBJECT)

PLATFORM-ID (OBJECT)

SETFPLATFORM-ID (NEW-VALUE OBJECT)

POSTSCRIPT-GLYPH-NAMES (OBJECT)

SETFPOSTSCRIPT-GLYPH-NAMES (NEW-VALUE OBJECT)

SEGMENT-COUNT (OBJECT)

SIZE (CONDITION)

START-CODES (OBJECT)

TABLE-COUNT (OBJECT)

TABLES (OBJECT)

VARIABLE

Private

Undocumented

*EMPTY-BOUNDING-BOX*

*EMPTY-CONTOURS*

*ENCODING-TABLES*

*MACINTOSH-ENCODING-IDS*

*MACROMAN-TRANSLATION-TABLE*

*MICROSOFT-ENCODING-IDS*

*NAME-IDENTIFIERS*

*PLATFORM-IDENTIFIERS*

*STANDARD-MAC-GLYPH-NAMES*

*UNICODE-ENCODING-IDS*

CLASS

Private

Undocumented

CONTROL-POINT

FONT-LOADER (OBJECT)

GLYPH

NAME-ENTRY

TABLE-INFO (TAG FONT-LOADER)

UNICODE-CMAP

CONDITION

Private

Undocumented

BAD-MAGIC

REGRETTABLE-HEX-VALUE

REGRETTABLE-VALUE

UNSUPPORTED-FORMAT

UNSUPPORTED-VALUE

UNSUPPORTED-VERSION

CONSTANT

Private

Undocumented

+CUSTOM-PLATFORM-ID+

+ISO-PLATFORM-ID+

+MACINTOSH-ENGLISH-LANGUAGE-ID+

+MACINTOSH-PLATFORM-ID+

+MACINTOSH-ROMAN-ENCODING-ID+

+MICROSOFT-PLATFORM-ID+

+MICROSOFT-SYMBOL-ENCODING-ID+

+MICROSOFT-UNICODE-BMP-ENCODING-ID+

+MICROSOFT-US-ENGLISH-LANGUAGE-ID+

+UNICODE-2.0-ENCODING-ID+

+UNICODE-LANGUAGE-ID+

+UNICODE-PLATFORM-ID+