~asdfghjkl-deactivatedaccount1/python-imaging/gif-fix

« back to all changes in this revision

Viewing changes to Docs/pythondoc-PIL.ImageFont.html

  • Committer: effbot
  • Date: 2006-07-05 20:36:11 UTC
  • Revision ID: svn-v4:be285980-f00d-0410-a9fe-d4747b46ecd0:pil:348
Load Imaging-1.1.6b1 into pil.

Show diffs side-by-side

added added

removed removed

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