Issue #7092: Fix the DeprecationWarnings emitted by the standard library
[python.git] / Doc / library / fm.rst
blobe46506b65ef1866dfa32738a744b8f10154fa994
2 :mod:`fm` --- *Font Manager* interface
3 ======================================
5 .. module:: fm
6    :platform: IRIX
7    :synopsis: Font Manager interface for SGI workstations.
8    :deprecated:
10 .. deprecated:: 2.6
11    The :mod:`fm` module has been deprecated for removal in Python 3.0.
15 .. index::
16    single: Font Manager, IRIS
17    single: IRIS Font Manager
19 This module provides access to the IRIS *Font Manager* library.   It is
20 available only on Silicon Graphics machines. See also: *4Sight User's Guide*,
21 section 1, chapter 5: "Using the IRIS Font Manager."
23 This is not yet a full interface to the IRIS Font Manager. Among the unsupported
24 features are: matrix operations; cache operations; character operations (use
25 string operations instead); some details of font info; individual glyph metrics;
26 and printer matching.
28 It supports the following operations:
31 .. function:: init()
33    Initialization function. Calls :cfunc:`fminit`. It is normally not necessary to
34    call this function, since it is called automatically the first time the
35    :mod:`fm` module is imported.
38 .. function:: findfont(fontname)
40    Return a font handle object. Calls ``fmfindfont(fontname)``.
43 .. function:: enumerate()
45    Returns a list of available font names. This is an interface to
46    :cfunc:`fmenumerate`.
49 .. function:: prstr(string)
51    Render a string using the current font (see the :func:`setfont` font handle
52    method below). Calls ``fmprstr(string)``.
55 .. function:: setpath(string)
57    Sets the font search path. Calls ``fmsetpath(string)``. (XXX Does not work!?!)
60 .. function:: fontpath()
62    Returns the current font search path.
64 Font handle objects support the following operations:
67 .. method:: font handle.scalefont(factor)
69    Returns a handle for a scaled version of this font. Calls ``fmscalefont(fh,
70    factor)``.
73 .. method:: font handle.setfont()
75    Makes this font the current font. Note: the effect is undone silently when the
76    font handle object is deleted. Calls ``fmsetfont(fh)``.
79 .. method:: font handle.getfontname()
81    Returns this font's name. Calls ``fmgetfontname(fh)``.
84 .. method:: font handle.getcomment()
86    Returns the comment string associated with this font. Raises an exception if
87    there is none. Calls ``fmgetcomment(fh)``.
90 .. method:: font handle.getfontinfo()
92    Returns a tuple giving some pertinent data about this font. This is an interface
93    to ``fmgetfontinfo()``. The returned tuple contains the following numbers:
94    ``(printermatched, fixed_width, xorig, yorig, xsize, ysize, height, nglyphs)``.
97 .. method:: font handle.getstrwidth(string)
99    Returns the width, in pixels, of *string* when drawn in this font. Calls
100    ``fmgetstrwidth(fh, string)``.