t1Imaging
Interface for using t1lib-generated bitmaps with Fredrik Lundh's Python Imaging Library.
This module provides alternate classes for FontSetter and Glyph from the t1lib module. These classes, ImagingSetter and ImagingGlyph, are used by instantiating an ImagingSetter instead of a FontSetter object. This works by overriding the FontSetter.newGlyph() method so that it creates ImagingGlyph objects instead of Glyph objects. The ImagingGlyphs have additional methods which support the creation of PIL images. The PIL images available via the additional interface can be used anywhere PIL images can be used.
Raised when a glyph cannot be converted to a PIL image.
Raised when a particular bitmap depth is required but not present.
FontSetter extension which can be used to derive PIL images.
Ensure that we don't have to deal with 16-bit bitmaps later.
0.0
0.0
0
1
Create a glyph which can be converted to a PIL image.
The arguments match those of t1lib.FontSetter.newGlyph().
Return the conversion mode for 32-bit images.
Set the conversion mode for 32-bit images.
Glyphs 32 bits deep can be converted to RGB or RGBA images.
Rasterize a string.
This is provided to support the ImageDraw class from the Python Imaging Library. This interface allows ImageSetter instances which generate glyphs of 1 bit per pixel to be passed to the ImageDraw.setfont() method.
If the bits-per-pixel for generated glyphs is not 1, DepthError is raised.
A rasterized image which is also a PIL image.
Run a stand-alone test.
This function parses the command line. It provides a limited self-test for this module.
t1Imaging