Class around PixMap objects that allows more python-like access. By Joe Strout.
[python/dscho.git] / Doc / lib / libfm.tex
blob765a4d8e0a9d04a42a36de2295c2a20424448c11
1 \section{\module{fm} ---
2 \emph{Font Manager} interface}
4 \declaremodule{builtin}{fm}
5 \platform{IRIX}
6 \modulesynopsis{\emph{Font Manager} interface for SGI workstations.}
9 This module provides access to the IRIS \emph{Font Manager} library.
10 \index{Font Manager, IRIS}
11 \index{IRIS Font Manager}
12 It is available only on Silicon Graphics machines.
13 See also: \emph{4Sight User's Guide}, Section 1, Chapter 5: ``Using
14 the IRIS Font Manager.''
16 This is not yet a full interface to the IRIS Font Manager.
17 Among the unsupported features are: matrix operations; cache
18 operations; character operations (use string operations instead); some
19 details of font info; individual glyph metrics; and printer matching.
21 It supports the following operations:
23 \begin{funcdesc}{init}{}
24 Initialization function.
25 Calls \cfunction{fminit()}.
26 It is normally not necessary to call this function, since it is called
27 automatically the first time the \module{fm} module is imported.
28 \end{funcdesc}
30 \begin{funcdesc}{findfont}{fontname}
31 Return a font handle object.
32 Calls \code{fmfindfont(\var{fontname})}.
33 \end{funcdesc}
35 \begin{funcdesc}{enumerate}{}
36 Returns a list of available font names.
37 This is an interface to \cfunction{fmenumerate()}.
38 \end{funcdesc}
40 \begin{funcdesc}{prstr}{string}
41 Render a string using the current font (see the \function{setfont()} font
42 handle method below).
43 Calls \code{fmprstr(\var{string})}.
44 \end{funcdesc}
46 \begin{funcdesc}{setpath}{string}
47 Sets the font search path.
48 Calls \code{fmsetpath(\var{string})}.
49 (XXX Does not work!?!)
50 \end{funcdesc}
52 \begin{funcdesc}{fontpath}{}
53 Returns the current font search path.
54 \end{funcdesc}
56 Font handle objects support the following operations:
58 \setindexsubitem{(font handle method)}
59 \begin{funcdesc}{scalefont}{factor}
60 Returns a handle for a scaled version of this font.
61 Calls \code{fmscalefont(\var{fh}, \var{factor})}.
62 \end{funcdesc}
64 \begin{funcdesc}{setfont}{}
65 Makes this font the current font.
66 Note: the effect is undone silently when the font handle object is
67 deleted.
68 Calls \code{fmsetfont(\var{fh})}.
69 \end{funcdesc}
71 \begin{funcdesc}{getfontname}{}
72 Returns this font's name.
73 Calls \code{fmgetfontname(\var{fh})}.
74 \end{funcdesc}
76 \begin{funcdesc}{getcomment}{}
77 Returns the comment string associated with this font.
78 Raises an exception if there is none.
79 Calls \code{fmgetcomment(\var{fh})}.
80 \end{funcdesc}
82 \begin{funcdesc}{getfontinfo}{}
83 Returns a tuple giving some pertinent data about this font.
84 This is an interface to \code{fmgetfontinfo()}.
85 The returned tuple contains the following numbers:
86 \code{(}\var{printermatched}, \var{fixed_width}, \var{xorig},
87 \var{yorig}, \var{xsize}, \var{ysize}, \var{height},
88 \var{nglyphs}\code{)}.
89 \end{funcdesc}
91 \begin{funcdesc}{getstrwidth}{string}
92 Returns the width, in pixels, of \var{string} when drawn in this font.
93 Calls \code{fmgetstrwidth(\var{fh}, \var{string})}.
94 \end{funcdesc}