Issue 2188: Documentation hint about disabling proxy detection.
[python.git] / Doc / library / fm.rst
blob0ab2781ec9d168a8f617da0176d3183383d2c94e
2 :mod:`fm` --- *Font Manager* interface
3 ======================================
5 .. module:: fm
6    :platform: IRIX
7    :synopsis: Font Manager interface for SGI workstations.
10 .. index::
11    single: Font Manager, IRIS
12    single: IRIS Font Manager
14 This module provides access to the IRIS *Font Manager* library.   It is
15 available only on Silicon Graphics machines. See also: *4Sight User's Guide*,
16 section 1, chapter 5: "Using the IRIS Font Manager."
18 This is not yet a full interface to the IRIS Font Manager. Among the unsupported
19 features are: matrix operations; cache operations; character operations (use
20 string operations instead); some details of font info; individual glyph metrics;
21 and printer matching.
23 It supports the following operations:
26 .. function:: init()
28    Initialization function. Calls :cfunc:`fminit`. It is normally not necessary to
29    call this function, since it is called automatically the first time the
30    :mod:`fm` module is imported.
33 .. function:: findfont(fontname)
35    Return a font handle object. Calls ``fmfindfont(fontname)``.
38 .. function:: enumerate()
40    Returns a list of available font names. This is an interface to
41    :cfunc:`fmenumerate`.
44 .. function:: prstr(string)
46    Render a string using the current font (see the :func:`setfont` font handle
47    method below). Calls ``fmprstr(string)``.
50 .. function:: setpath(string)
52    Sets the font search path. Calls ``fmsetpath(string)``. (XXX Does not work!?!)
55 .. function:: fontpath()
57    Returns the current font search path.
59 Font handle objects support the following operations:
62 .. method:: font handle.scalefont(factor)
64    Returns a handle for a scaled version of this font. Calls ``fmscalefont(fh,
65    factor)``.
68 .. method:: font handle.setfont()
70    Makes this font the current font. Note: the effect is undone silently when the
71    font handle object is deleted. Calls ``fmsetfont(fh)``.
74 .. method:: font handle.getfontname()
76    Returns this font's name. Calls ``fmgetfontname(fh)``.
79 .. method:: font handle.getcomment()
81    Returns the comment string associated with this font. Raises an exception if
82    there is none. Calls ``fmgetcomment(fh)``.
85 .. method:: font handle.getfontinfo()
87    Returns a tuple giving some pertinent data about this font. This is an interface
88    to ``fmgetfontinfo()``. The returned tuple contains the following numbers:
89    ``(printermatched, fixed_width, xorig, yorig, xsize, ysize, height, nglyphs)``.
92 .. method:: font handle.getstrwidth(string)
94    Returns the width, in pixels, of *string* when drawn in this font. Calls
95    ``fmgetstrwidth(fh, string)``.