1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
<title>The PIL.ImageFont Module</title>
<link rel='stylesheet' href='effbot.css' type='text/css' />
</head>
<body>
<h1>The PIL.ImageFont Module</h1>
<dl>
<dt><b>FreeTypeFont(file, size, index=0, encoding="")</b> (class) [<a href='#PIL.ImageFont.FreeTypeFont-class'>#</a>]</dt>
<dd>
<p>Wrapper for FreeType fonts.</p>
<p>For more information about this class, see <a href='#PIL.ImageFont.FreeTypeFont-class'><i>The FreeTypeFont Class</i></a>.</p>
</dd>
<dt><b>ImageFont</b> (class) [<a href='#PIL.ImageFont.ImageFont-class'>#</a>]</dt>
<dd>
<p>The ImageFont module defines a class with the same name.</p>
<p>For more information about this class, see <a href='#PIL.ImageFont.ImageFont-class'><i>The ImageFont Class</i></a>.</p>
</dd>
<dt><a id='PIL.ImageFont.load-function' name='PIL.ImageFont.load-function'><b>load(filename)</b></a> [<a href='#PIL.ImageFont.load-function'>#</a>]</dt>
<dd>
<dl>
<dt><i>filename</i></dt>
<dd>
</dd>
<dt>Returns:</dt>
<dd>
</dd>
<dt>Raises <b>IOError</b>:</dt><dd>
</dd>
</dl><br />
</dd>
<dt><a id='PIL.ImageFont.load_default-function' name='PIL.ImageFont.load_default-function'><b>load_default()</b></a> [<a href='#PIL.ImageFont.load_default-function'>#</a>]</dt>
<dd>
<dl>
<dt>Returns:</dt>
<dd>
</dd>
</dl><br />
</dd>
<dt><a id='PIL.ImageFont.load_path-function' name='PIL.ImageFont.load_path-function'><b>load_path(filename)</b></a> [<a href='#PIL.ImageFont.load_path-function'>#</a>]</dt>
<dd>
<dl>
<dt><i>filename</i></dt>
<dd>
</dd>
<dt>Returns:</dt>
<dd>
</dd>
<dt>Raises <b>IOError</b>:</dt><dd>
</dd>
</dl><br />
</dd>
<dt><b>TransposedFont(font, orientation=None)</b> (class) [<a href='#PIL.ImageFont.TransposedFont-class'>#</a>]</dt>
<dd>
<p>Wrapper that creates a transposed font from any existing font
object.</p>
<dl>
<dt><i>font</i></dt>
<dd>
</dd>
<dt><i>orientation</i></dt>
<dd>
</dd>
</dl><br />
<p>For more information about this class, see <a href='#PIL.ImageFont.TransposedFont-class'><i>The TransposedFont Class</i></a>.</p>
</dd>
<dt><a id='PIL.ImageFont.truetype-function' name='PIL.ImageFont.truetype-function'><b>truetype(filename, size, index=0, encoding="")</b></a> [<a href='#PIL.ImageFont.truetype-function'>#</a>]</dt>
<dd>
<p>Load a TrueType or OpenType font file, and create a font object.
This function loads a font object from the given file, and creates
a font object for a font of the given size.
</p><p>
This function requires the _imagingft service.
</p><dl>
<dt><i>filename</i></dt>
<dd>
A truetype font file. Under Windows, if the file
is not found in this filename, the loader also looks in Windows
<b>fonts</b> directory
</dd>
<dt><i>size</i></dt>
<dd>
</dd>
<dt><i>index</i></dt>
<dd>
</dd>
<dt><i>encoding</i></dt>
<dd>
</dd>
<dt>Returns:</dt>
<dd>
</dd>
<dt>Raises <b>IOError</b>:</dt><dd>
</dd>
</dl><br />
</dd>
</dl>
<h2><a id='PIL.ImageFont.FreeTypeFont-class' name='PIL.ImageFont.FreeTypeFont-class'>The FreeTypeFont Class</a></h2>
<dl>
<dt><b>FreeTypeFont(file, size, index=0, encoding="")</b> (class) [<a href='#PIL.ImageFont.FreeTypeFont-class'>#</a>]</dt>
<dd>
<p>Wrapper for FreeType fonts. Application code should use the
<b>truetype</b> factory function to create font objects.
</p></dd>
</dl>
<h2><a id='PIL.ImageFont.ImageFont-class' name='PIL.ImageFont.ImageFont-class'>The ImageFont Class</a></h2>
<dl>
<dt><b>ImageFont</b> (class) [<a href='#PIL.ImageFont.ImageFont-class'>#</a>]</dt>
<dd>
<p>The <b>ImageFont</b> module defines a class with the same name.
Instances of this class store bitmap fonts, and are used with the
<b>text</b> method of the <b>ImageDraw</b> class.
</p><p>
PIL uses it's own font file format to store bitmap fonts. You can
use the <b>pilfont</b> utility to convert BDF and PCF font
descriptors (X window font formats) to this format.
</p><p>
Starting with version 1.1.4, PIL can be configured to support
TrueType and OpenType fonts. For earlier version, TrueType
support is only available as part of the imToolkit package
</p></dd>
</dl>
<h2><a id='PIL.ImageFont.TransposedFont-class' name='PIL.ImageFont.TransposedFont-class'>The TransposedFont Class</a></h2>
<dl>
<dt><b>TransposedFont(font, orientation=None)</b> (class) [<a href='#PIL.ImageFont.TransposedFont-class'>#</a>]</dt>
<dd>
<dl>
<dt><i>font</i></dt>
<dd>
</dd>
<dt><i>orientation</i></dt>
<dd>
</dd>
</dl><br />
</dd>
</dl>
</body></html>
|