1
========================
2
The PIL.ImageFont Module
3
========================
5
The PIL.ImageFont Module
6
========================
8
**FreeTypeFont(file, size, index=0, encoding="")** (class)
9
[`# <#PIL.ImageFont.FreeTypeFont-class>`_]
10
Wrapper for FreeType fonts.
12
For more information about this class, see `*The FreeTypeFont
13
Class* <#PIL.ImageFont.FreeTypeFont-class>`_.
15
**ImageFont** (class) [`# <#PIL.ImageFont.ImageFont-class>`_]
16
The ImageFont module defines a class with the same name.
18
For more information about this class, see `*The ImageFont
19
Class* <#PIL.ImageFont.ImageFont-class>`_.
21
**load(filename)** [`# <#PIL.ImageFont.load-function>`_]
27
**load\_default()** [`# <#PIL.ImageFont.load_default-function>`_]
31
**load\_path(filename)** [`# <#PIL.ImageFont.load_path-function>`_]
37
**TransposedFont(font, orientation=None)** (class)
38
[`# <#PIL.ImageFont.TransposedFont-class>`_]
39
Wrapper that creates a transposed font from any existing font
45
For more information about this class, see `*The TransposedFont
46
Class* <#PIL.ImageFont.TransposedFont-class>`_.
48
**truetype(filename, size, index=0, encoding="")**
49
[`# <#PIL.ImageFont.truetype-function>`_]
50
Load a TrueType or OpenType font file, and create a font object.
51
This function loads a font object from the given file, and creates a
52
font object for a font of the given size.
54
This function requires the \_imagingft service.
57
A truetype font file. Under Windows, if the file is not found in
58
this filename, the loader also looks in Windows **fonts**
66
The FreeTypeFont Class
67
----------------------
69
**FreeTypeFont(file, size, index=0, encoding="")** (class)
70
[`# <#PIL.ImageFont.FreeTypeFont-class>`_]
71
Wrapper for FreeType fonts. Application code should use the
72
**truetype** factory function to create font objects.
77
**ImageFont** (class) [`# <#PIL.ImageFont.ImageFont-class>`_]
78
The **ImageFont** module defines a class with the same name.
79
Instances of this class store bitmap fonts, and are used with the
80
**text** method of the **ImageDraw** class.
82
PIL uses it's own font file format to store bitmap fonts. You can
83
use the **pilfont** utility to convert BDF and PCF font descriptors
84
(X window font formats) to this format.
86
Starting with version 1.1.4, PIL can be configured to support
87
TrueType and OpenType fonts. For earlier version, TrueType support
88
is only available as part of the imToolkit package
90
The TransposedFont Class
91
------------------------
93
**TransposedFont(font, orientation=None)** (class)
94
[`# <#PIL.ImageFont.TransposedFont-class>`_]