/usr/share/doc/python-imaging/html/imagefont.htm is in python-imaging-doc-html 1.1.2-1.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <html><head><title>The ImageFont Module</title><link rel="stylesheet" type="text/css" href="effbot.css" /></head><body><div id="IMAGEFONT-MODULE" class="chapter"><h1 style="chapter">The ImageFont Module</h1><p>The ImageFont module defines a class with the same name.
Instances of this class store bitmap fonts, and are used with the
<a href="imagedraw.htm#imagedraw-text-method"><tt>text</tt></a>
method in the <a href="imagedraw.htm#imagedraw-module"><tt>ImageDraw</tt></a>
class.</p><p>PIL uses it's own font file format to store bitmap fonts. You
can use the <a href="pilfont.htm#pilfont-command"><tt>pilfont</tt></a> utility to
convert BDF and PCF font descriptors (X window font formats) to this
format.</p><div class="sect1"><h2 style="sect1">Functions</h2><div class="sect2"><h3 style="sect2">load (factory)</h3><p><tt>load(file)</tt>. Loads a font from the given file, and
returns the corresponding font object. If this function fails, it
raises an <tt>IOError</tt> exception.</p></div><div class="sect2"><h3 style="sect2">load_path (factory)</h3><p><tt>load_path(file)</tt>. Same as <tt>load</tt>,
but searches for the file along <tt>sys.path</tt> if it's
not found in the current directory.</p></div></div><div class="sect1"><h2 style="sect1">Methods</h2><div class="sect2"><h3 style="sect2">getsize</h3><p><tt>getsize(text)</tt>. Returns the width and height of the
given text, as a 2-tuple.</p></div><div class="sect2"><h3 style="sect2">getmask</h3><p><tt>getmask(text)</tt>. Returns a bitmap for the text. The
bitmap should be an internal PIL storage memory instance (as defined
by the <tt>_imaging</tt> interface module).</p><p>If the font uses antialiasing, the bitmap should have mode "L"
and use a maximum value of 255. Otherwise, it should have mode "1".</p></div></div></div></body></html>
|