~ubuntu-branches/ubuntu/wily/python-imaging/wily

« back to all changes in this revision

Viewing changes to docs/pythondoc-PIL.ImageFont.rst

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-31 20:49:20 UTC
  • mfrom: (1.1.4)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130131204920-7tnuhqhlsqdza4c2
Rewrite build dependencies to allow cross builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
========================
 
2
The PIL.ImageFont Module
 
3
========================
 
4
 
 
5
The PIL.ImageFont Module
 
6
========================
 
7
 
 
8
**FreeTypeFont(file, size, index=0, encoding="")** (class)
 
9
[`# <#PIL.ImageFont.FreeTypeFont-class>`_]
 
10
    Wrapper for FreeType fonts.
 
11
 
 
12
    For more information about this class, see `*The FreeTypeFont
 
13
    Class* <#PIL.ImageFont.FreeTypeFont-class>`_.
 
14
 
 
15
**ImageFont** (class) [`# <#PIL.ImageFont.ImageFont-class>`_]
 
16
    The ImageFont module defines a class with the same name.
 
17
 
 
18
    For more information about this class, see `*The ImageFont
 
19
    Class* <#PIL.ImageFont.ImageFont-class>`_.
 
20
 
 
21
**load(filename)** [`# <#PIL.ImageFont.load-function>`_]
 
22
 
 
23
    *filename*
 
24
    Returns:
 
25
    Raises **IOError**:
 
26
 
 
27
**load\_default()** [`# <#PIL.ImageFont.load_default-function>`_]
 
28
 
 
29
    Returns:
 
30
 
 
31
**load\_path(filename)** [`# <#PIL.ImageFont.load_path-function>`_]
 
32
 
 
33
    *filename*
 
34
    Returns:
 
35
    Raises **IOError**:
 
36
 
 
37
**TransposedFont(font, orientation=None)** (class)
 
38
[`# <#PIL.ImageFont.TransposedFont-class>`_]
 
39
    Wrapper that creates a transposed font from any existing font
 
40
    object.
 
41
 
 
42
    *font*
 
43
    *orientation*
 
44
 
 
45
    For more information about this class, see `*The TransposedFont
 
46
    Class* <#PIL.ImageFont.TransposedFont-class>`_.
 
47
 
 
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.
 
53
 
 
54
    This function requires the \_imagingft service.
 
55
 
 
56
    *filename*
 
57
        A truetype font file. Under Windows, if the file is not found in
 
58
        this filename, the loader also looks in Windows **fonts**
 
59
        directory
 
60
    *size*
 
61
    *index*
 
62
    *encoding*
 
63
    Returns:
 
64
    Raises **IOError**:
 
65
 
 
66
The FreeTypeFont Class
 
67
----------------------
 
68
 
 
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.
 
73
 
 
74
The ImageFont Class
 
75
-------------------
 
76
 
 
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.
 
81
 
 
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.
 
85
 
 
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
 
89
 
 
90
The TransposedFont Class
 
91
------------------------
 
92
 
 
93
**TransposedFont(font, orientation=None)** (class)
 
94
[`# <#PIL.ImageFont.TransposedFont-class>`_]
 
95
 
 
96
    *font*
 
97
    *orientation*
 
98