| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../../gallery/animation/../misc/../../api/_type1font.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib._type1fontmatplotlib._type1font#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.
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})
subset_font = font.subset([ord(c) for c in 'Hello World'])
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.
Bases: object
A class representing a Type-1 font, for use by backends.
A 3-tuple of the cleartext part, the encrypted part, and the finale of zeros.
The decrypted form of parts[1].
A dictionary of font properties. Noteworthy keys include:
FontName: PostScript name of the font
Encoding: dict from numeric codes to glyph names
FontMatrix: bytes object encoding a matrix
UniqueID: optional font identifier, dropped when modifying the font
CharStrings: dict from glyph names to byte code
Subrs: array of byte code subroutines
OtherSubrs: bytes object encoding some PostScript code
Initialize a Type-1 font.
Either a pfb file name, or a 3-tuple of already-decoded Type-1
font parts.
Return a new font that only defines the given characters.
The subset of characters to include. These are indices into the font's encoding array. The encoding array of a Type-1 font can only include 256 characters, but other glyphs may be accessed via the seac operator.
Prefix to prepend to the font name.
Return a new font that is slanted and/or extended.
A dict with optional entries:
Tangent of the angle that the font is to be slanted to the right. Negative values slant to the left.
Scaling factor for the font width. Values less than 1 condense the glyphs.
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |