source: vendor/python/2.5/Doc/lib/libfm.tex

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 2.8 KB
Line 
1\section{\module{fm} ---
2 \emph{Font Manager} interface}
3
4\declaremodule{builtin}{fm}
5 \platform{IRIX}
6\modulesynopsis{\emph{Font Manager} interface for SGI workstations.}
7
8
9This module provides access to the IRIS \emph{Font Manager} library.
10\index{Font Manager, IRIS}
11\index{IRIS Font Manager}
12It is available only on Silicon Graphics machines.
13See also: \emph{4Sight User's Guide}, section 1, chapter 5: ``Using
14the IRIS Font Manager.''
15
16This is not yet a full interface to the IRIS Font Manager.
17Among the unsupported features are: matrix operations; cache
18operations; character operations (use string operations instead); some
19details of font info; individual glyph metrics; and printer matching.
20
21It supports the following operations:
22
23\begin{funcdesc}{init}{}
24Initialization function.
25Calls \cfunction{fminit()}.
26It is normally not necessary to call this function, since it is called
27automatically the first time the \module{fm} module is imported.
28\end{funcdesc}
29
30\begin{funcdesc}{findfont}{fontname}
31Return a font handle object.
32Calls \code{fmfindfont(\var{fontname})}.
33\end{funcdesc}
34
35\begin{funcdesc}{enumerate}{}
36Returns a list of available font names.
37This is an interface to \cfunction{fmenumerate()}.
38\end{funcdesc}
39
40\begin{funcdesc}{prstr}{string}
41Render a string using the current font (see the \function{setfont()} font
42handle method below).
43Calls \code{fmprstr(\var{string})}.
44\end{funcdesc}
45
46\begin{funcdesc}{setpath}{string}
47Sets the font search path.
48Calls \code{fmsetpath(\var{string})}.
49(XXX Does not work!?!)
50\end{funcdesc}
51
52\begin{funcdesc}{fontpath}{}
53Returns the current font search path.
54\end{funcdesc}
55
56Font handle objects support the following operations:
57
58\setindexsubitem{(font handle method)}
59\begin{funcdesc}{scalefont}{factor}
60Returns a handle for a scaled version of this font.
61Calls \code{fmscalefont(\var{fh}, \var{factor})}.
62\end{funcdesc}
63
64\begin{funcdesc}{setfont}{}
65Makes this font the current font.
66Note: the effect is undone silently when the font handle object is
67deleted.
68Calls \code{fmsetfont(\var{fh})}.
69\end{funcdesc}
70
71\begin{funcdesc}{getfontname}{}
72Returns this font's name.
73Calls \code{fmgetfontname(\var{fh})}.
74\end{funcdesc}
75
76\begin{funcdesc}{getcomment}{}
77Returns the comment string associated with this font.
78Raises an exception if there is none.
79Calls \code{fmgetcomment(\var{fh})}.
80\end{funcdesc}
81
82\begin{funcdesc}{getfontinfo}{}
83Returns a tuple giving some pertinent data about this font.
84This is an interface to \code{fmgetfontinfo()}.
85The 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}
90
91\begin{funcdesc}{getstrwidth}{string}
92Returns the width, in pixels, of \var{string} when drawn in this font.
93Calls \code{fmgetstrwidth(\var{fh}, \var{string})}.
94\end{funcdesc}
Note: See TracBrowser for help on using the repository browser.