Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / html / python / lib / module-fm.html
CommitLineData
86530b38
AT
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<link rel="STYLESHEET" href="lib.css" type='text/css' />
5<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
6<link rel='start' href='../index.html' title='Python Documentation Index' />
7<link rel="first" href="lib.html" title='Python Library Reference' />
8<link rel='contents' href='contents.html' title="Contents" />
9<link rel='index' href='genindex.html' title='Index' />
10<link rel='last' href='about.html' title='About this document...' />
11<link rel='help' href='about.html' title='About this document...' />
12<link rel="next" href="module-gl.html" />
13<link rel="prev" href="module-flp.html" />
14<link rel="parent" href="sgi.html" />
15<link rel="next" href="module-gl.html" />
16<meta name='aesop' content='information' />
17<title>20.7 fm -- Font Manager interface</title>
18</head>
19<body>
20<DIV CLASS="navigation">
21<div id='top-navigation-panel' xml:id='top-navigation-panel'>
22<table align="center" width="100%" cellpadding="0" cellspacing="2">
23<tr>
24<td class='online-navigation'><a rel="prev" title="20.6 flp "
25 href="module-flp.html"><img src='../icons/previous.png'
26 border='0' height='32' alt='Previous Page' width='32' /></A></td>
27<td class='online-navigation'><a rel="parent" title="20. SGI IRIX Specific"
28 href="sgi.html"><img src='../icons/up.png'
29 border='0' height='32' alt='Up One Level' width='32' /></A></td>
30<td class='online-navigation'><a rel="next" title="20.8 gl "
31 href="module-gl.html"><img src='../icons/next.png'
32 border='0' height='32' alt='Next Page' width='32' /></A></td>
33<td align="center" width="100%">Python Library Reference</td>
34<td class='online-navigation'><a rel="contents" title="Table of Contents"
35 href="contents.html"><img src='../icons/contents.png'
36 border='0' height='32' alt='Contents' width='32' /></A></td>
37<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
38 border='0' height='32' alt='Module Index' width='32' /></a></td>
39<td class='online-navigation'><a rel="index" title="Index"
40 href="genindex.html"><img src='../icons/index.png'
41 border='0' height='32' alt='Index' width='32' /></A></td>
42</tr></table>
43<div class='online-navigation'>
44<b class="navlabel">Previous:</b>
45<a class="sectref" rel="prev" href="module-flp.html">20.6 flp </A>
46<b class="navlabel">Up:</b>
47<a class="sectref" rel="parent" href="sgi.html">20. SGI IRIX Specific</A>
48<b class="navlabel">Next:</b>
49<a class="sectref" rel="next" href="module-gl.html">20.8 gl </A>
50</div>
51<hr /></div>
52</DIV>
53<!--End of Navigation Panel-->
54
55<H1><A NAME="SECTION0022700000000000000000">
5620.7 <tt class="module">fm</tt> --
57 <em>Font Manager</em> interface</A>
58</H1>
59
60<P>
61<A NAME="module-fm"></A>
62<p class="availability">Availability: <span
63 class="platform">IRIX</span>.</p>
64
65<P>
66This module provides access to the IRIS <em>Font Manager</em> library.
67<a id='l2h-5190' xml:id='l2h-5190'></a>
68It is available only on Silicon Graphics machines.
69See also: <em>4Sight User's Guide</em>, section 1, chapter 5: ``Using
70the IRIS Font Manager.''
71
72<P>
73This is not yet a full interface to the IRIS Font Manager.
74Among the unsupported features are: matrix operations; cache
75operations; character operations (use string operations instead); some
76details of font info; individual glyph metrics; and printer matching.
77
78<P>
79It supports the following operations:
80
81<P>
82<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
83 <td><nobr><b><tt id='l2h-5178' xml:id='l2h-5178' class="function">init</tt></b>(</nobr></td>
84 <td><var></var>)</td></tr></table></dt>
85<dd>
86Initialization function.
87Calls <tt class="cfunction">fminit()</tt>.
88It is normally not necessary to call this function, since it is called
89automatically the first time the <tt class="module">fm</tt> module is imported.
90</dl>
91
92<P>
93<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
94 <td><nobr><b><tt id='l2h-5179' xml:id='l2h-5179' class="function">findfont</tt></b>(</nobr></td>
95 <td><var>fontname</var>)</td></tr></table></dt>
96<dd>
97Return a font handle object.
98Calls <code>fmfindfont(<var>fontname</var>)</code>.
99</dl>
100
101<P>
102<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
103 <td><nobr><b><tt id='l2h-5180' xml:id='l2h-5180' class="function">enumerate</tt></b>(</nobr></td>
104 <td><var></var>)</td></tr></table></dt>
105<dd>
106Returns a list of available font names.
107This is an interface to <tt class="cfunction">fmenumerate()</tt>.
108</dl>
109
110<P>
111<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
112 <td><nobr><b><tt id='l2h-5181' xml:id='l2h-5181' class="function">prstr</tt></b>(</nobr></td>
113 <td><var>string</var>)</td></tr></table></dt>
114<dd>
115Render a string using the current font (see the <tt class="function">setfont()</tt> font
116handle method below).
117Calls <code>fmprstr(<var>string</var>)</code>.
118</dl>
119
120<P>
121<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
122 <td><nobr><b><tt id='l2h-5182' xml:id='l2h-5182' class="function">setpath</tt></b>(</nobr></td>
123 <td><var>string</var>)</td></tr></table></dt>
124<dd>
125Sets the font search path.
126Calls <code>fmsetpath(<var>string</var>)</code>.
127(XXX Does not work!?!)
128</dl>
129
130<P>
131<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
132 <td><nobr><b><tt id='l2h-5183' xml:id='l2h-5183' class="function">fontpath</tt></b>(</nobr></td>
133 <td><var></var>)</td></tr></table></dt>
134<dd>
135Returns the current font search path.
136</dl>
137
138<P>
139Font handle objects support the following operations:
140
141<P>
142
143<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
144 <td><nobr><b><tt id='l2h-5184' xml:id='l2h-5184' class="function">scalefont</tt></b>(</nobr></td>
145 <td><var>factor</var>)</td></tr></table></dt>
146<dd>
147Returns a handle for a scaled version of this font.
148Calls <code>fmscalefont(<var>fh</var>, <var>factor</var>)</code>.
149</dl>
150
151<P>
152<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
153 <td><nobr><b><tt id='l2h-5185' xml:id='l2h-5185' class="function">setfont</tt></b>(</nobr></td>
154 <td><var></var>)</td></tr></table></dt>
155<dd>
156Makes this font the current font.
157Note: the effect is undone silently when the font handle object is
158deleted.
159Calls <code>fmsetfont(<var>fh</var>)</code>.
160</dl>
161
162<P>
163<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
164 <td><nobr><b><tt id='l2h-5186' xml:id='l2h-5186' class="function">getfontname</tt></b>(</nobr></td>
165 <td><var></var>)</td></tr></table></dt>
166<dd>
167Returns this font's name.
168Calls <code>fmgetfontname(<var>fh</var>)</code>.
169</dl>
170
171<P>
172<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
173 <td><nobr><b><tt id='l2h-5187' xml:id='l2h-5187' class="function">getcomment</tt></b>(</nobr></td>
174 <td><var></var>)</td></tr></table></dt>
175<dd>
176Returns the comment string associated with this font.
177Raises an exception if there is none.
178Calls <code>fmgetcomment(<var>fh</var>)</code>.
179</dl>
180
181<P>
182<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
183 <td><nobr><b><tt id='l2h-5188' xml:id='l2h-5188' class="function">getfontinfo</tt></b>(</nobr></td>
184 <td><var></var>)</td></tr></table></dt>
185<dd>
186Returns a tuple giving some pertinent data about this font.
187This is an interface to <code>fmgetfontinfo()</code>.
188The returned tuple contains the following numbers:
189<code>(</code><var>printermatched</var>, <var>fixed_width</var>, <var>xorig</var>,
190<var>yorig</var>, <var>xsize</var>, <var>ysize</var>, <var>height</var>,
191<var>nglyphs</var><code>)</code>.
192</dl>
193
194<P>
195<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
196 <td><nobr><b><tt id='l2h-5189' xml:id='l2h-5189' class="function">getstrwidth</tt></b>(</nobr></td>
197 <td><var>string</var>)</td></tr></table></dt>
198<dd>
199Returns the width, in pixels, of <var>string</var> when drawn in this font.
200Calls <code>fmgetstrwidth(<var>fh</var>, <var>string</var>)</code>.
201</dl>
202
203<DIV CLASS="navigation">
204<div class='online-navigation'>
205<p></p><hr />
206<table align="center" width="100%" cellpadding="0" cellspacing="2">
207<tr>
208<td class='online-navigation'><a rel="prev" title="20.6 flp "
209 href="module-flp.html"><img src='../icons/previous.png'
210 border='0' height='32' alt='Previous Page' width='32' /></A></td>
211<td class='online-navigation'><a rel="parent" title="20. SGI IRIX Specific"
212 href="sgi.html"><img src='../icons/up.png'
213 border='0' height='32' alt='Up One Level' width='32' /></A></td>
214<td class='online-navigation'><a rel="next" title="20.8 gl "
215 href="module-gl.html"><img src='../icons/next.png'
216 border='0' height='32' alt='Next Page' width='32' /></A></td>
217<td align="center" width="100%">Python Library Reference</td>
218<td class='online-navigation'><a rel="contents" title="Table of Contents"
219 href="contents.html"><img src='../icons/contents.png'
220 border='0' height='32' alt='Contents' width='32' /></A></td>
221<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
222 border='0' height='32' alt='Module Index' width='32' /></a></td>
223<td class='online-navigation'><a rel="index" title="Index"
224 href="genindex.html"><img src='../icons/index.png'
225 border='0' height='32' alt='Index' width='32' /></A></td>
226</tr></table>
227<div class='online-navigation'>
228<b class="navlabel">Previous:</b>
229<a class="sectref" rel="prev" href="module-flp.html">20.6 flp </A>
230<b class="navlabel">Up:</b>
231<a class="sectref" rel="parent" href="sgi.html">20. SGI IRIX Specific</A>
232<b class="navlabel">Next:</b>
233<a class="sectref" rel="next" href="module-gl.html">20.8 gl </A>
234</div>
235</div>
236<hr />
237<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
238</DIV>
239<!--End of Navigation Panel-->
240<ADDRESS>
241See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
242</ADDRESS>
243</BODY>
244</HTML>