Module dict

Source
Expand description

Parsing for PostScript DICTs.

Structsยง

BcdComponents
Components for computing a fixed point value for a binary coded decimal number.
Blues
Operand for the BlueValues, OtherBlues, FamilyBlues and FamilyOtherBlues operators.
StemSnaps
Operand for the StemSnapH and StemSnapV operators.

Enumsยง

Entry
PostScript DICT Operator with its associated operands.
Operator
PostScript DICT operator.
Token
Either a PostScript DICT operator or a (numeric) operand.

Constantsยง

BCD_INTEGER_LIMIT ๐Ÿ”’
BCD_NUMBER_LIMIT ๐Ÿ”’
BCD_OVERFLOW ๐Ÿ”’
BCD_POWER_TENS ๐Ÿ”’
BCD_UNDERFLOW ๐Ÿ”’
MAX_BLUE_VALUES ๐Ÿ”’
https://gitlab.freedesktop.org/freetype/freetype/-/blob/80a507a6b8e3d2906ad2c8ba69329bd2fb2a85ef/src/psaux/psblues.h#L141
MAX_STEM_SNAPS ๐Ÿ”’
Summary: older PostScript interpreters accept two values, but newer ones accept 12. Weโ€™ll assume that as maximum. https://adobe-type-tools.github.io/font-tech-notes/pdfs/5049.StemSnap.pdf

Functionsยง

entries
Given a byte slice containing DICT data, returns an iterator yielding each operator with its associated operands.
is_degenerate ๐Ÿ”’
Check for a degenerate matrix. See https://gitlab.freedesktop.org/freetype/freetype/-/blob/f1cd6dbfa0c98f352b698448f40ac27e8fb3832e/src/base/ftcalc.c#L725
parse_entry ๐Ÿ”’
parse_fixed_dynamic ๐Ÿ”’
Parse a fixed point value with a dynamic scaling factor.
parse_font_matrix ๐Ÿ”’
Parses a font matrix using dynamic scaling factors.
parse_int ๐Ÿ”’
parse_token ๐Ÿ”’
tokens
Given a byte slice containing DICT data, returns an iterator yielding raw operands and operators.