mpl.type1font

This module contains a class representing a Type 1 font.

This version reads pfa and pfb files and splits them for embedding in pdf files. It also supports SlantFont and ExtendFont transformations, similarly to pdfTeX and friends. There is no support yet for subsetting.

Usage:

>>> font = Type1Font(filename)
>>> clear_part, encrypted_part, finale = font.parts
>>> slanted_font = font.transform({'slant': 0.167})
>>> extended_font = font.transform({'extend': 1.2})

Sources:

  • Adobe Technical Note #5040, Supporting Downloadable PostScript Language Fonts.
  • Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing, v1.1, 1993. ISBN 0-201-57044-0.

Functions

unichr((i) -> Unicode character) Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.

Classes

Type1Font(input) A class representing a Type-1 font, for use by backends.