Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / html / python / lib / module-fm.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index' />
<link rel="first" href="lib.html" title='Python Library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="module-gl.html" />
<link rel="prev" href="module-flp.html" />
<link rel="parent" href="sgi.html" />
<link rel="next" href="module-gl.html" />
<meta name='aesop' content='information' />
<title>20.7 fm -- Font Manager interface</title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.6 flp "
href="module-flp.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="20. SGI IRIX Specific"
href="sgi.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="20.8 gl "
href="module-gl.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-flp.html">20.6 flp </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="sgi.html">20. SGI IRIX Specific</A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-gl.html">20.8 gl </A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION0022700000000000000000">
20.7 <tt class="module">fm</tt> --
<em>Font Manager</em> interface</A>
</H1>
<P>
<A NAME="module-fm"></A>
<p class="availability">Availability: <span
class="platform">IRIX</span>.</p>
<P>
This module provides access to the IRIS <em>Font Manager</em> library.
<a id='l2h-5190' xml:id='l2h-5190'></a>
It is available only on Silicon Graphics machines.
See also: <em>4Sight User's Guide</em>, section 1, chapter 5: ``Using
the IRIS Font Manager.''
<P>
This is not yet a full interface to the IRIS Font Manager.
Among the unsupported features are: matrix operations; cache
operations; character operations (use string operations instead); some
details of font info; individual glyph metrics; and printer matching.
<P>
It supports the following operations:
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5178' xml:id='l2h-5178' class="function">init</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Initialization function.
Calls <tt class="cfunction">fminit()</tt>.
It is normally not necessary to call this function, since it is called
automatically the first time the <tt class="module">fm</tt> module is imported.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5179' xml:id='l2h-5179' class="function">findfont</tt></b>(</nobr></td>
<td><var>fontname</var>)</td></tr></table></dt>
<dd>
Return a font handle object.
Calls <code>fmfindfont(<var>fontname</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5180' xml:id='l2h-5180' class="function">enumerate</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Returns a list of available font names.
This is an interface to <tt class="cfunction">fmenumerate()</tt>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5181' xml:id='l2h-5181' class="function">prstr</tt></b>(</nobr></td>
<td><var>string</var>)</td></tr></table></dt>
<dd>
Render a string using the current font (see the <tt class="function">setfont()</tt> font
handle method below).
Calls <code>fmprstr(<var>string</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5182' xml:id='l2h-5182' class="function">setpath</tt></b>(</nobr></td>
<td><var>string</var>)</td></tr></table></dt>
<dd>
Sets the font search path.
Calls <code>fmsetpath(<var>string</var>)</code>.
(XXX Does not work!?!)
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5183' xml:id='l2h-5183' class="function">fontpath</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Returns the current font search path.
</dl>
<P>
Font handle objects support the following operations:
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5184' xml:id='l2h-5184' class="function">scalefont</tt></b>(</nobr></td>
<td><var>factor</var>)</td></tr></table></dt>
<dd>
Returns a handle for a scaled version of this font.
Calls <code>fmscalefont(<var>fh</var>, <var>factor</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5185' xml:id='l2h-5185' class="function">setfont</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Makes this font the current font.
Note: the effect is undone silently when the font handle object is
deleted.
Calls <code>fmsetfont(<var>fh</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5186' xml:id='l2h-5186' class="function">getfontname</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Returns this font's name.
Calls <code>fmgetfontname(<var>fh</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5187' xml:id='l2h-5187' class="function">getcomment</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Returns the comment string associated with this font.
Raises an exception if there is none.
Calls <code>fmgetcomment(<var>fh</var>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5188' xml:id='l2h-5188' class="function">getfontinfo</tt></b>(</nobr></td>
<td><var></var>)</td></tr></table></dt>
<dd>
Returns a tuple giving some pertinent data about this font.
This is an interface to <code>fmgetfontinfo()</code>.
The returned tuple contains the following numbers:
<code>(</code><var>printermatched</var>, <var>fixed_width</var>, <var>xorig</var>,
<var>yorig</var>, <var>xsize</var>, <var>ysize</var>, <var>height</var>,
<var>nglyphs</var><code>)</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-5189' xml:id='l2h-5189' class="function">getstrwidth</tt></b>(</nobr></td>
<td><var>string</var>)</td></tr></table></dt>
<dd>
Returns the width, in pixels, of <var>string</var> when drawn in this font.
Calls <code>fmgetstrwidth(<var>fh</var>, <var>string</var>)</code>.
</dl>
<DIV CLASS="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.6 flp "
href="module-flp.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="20. SGI IRIX Specific"
href="sgi.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="20.8 gl "
href="module-gl.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-flp.html">20.6 flp </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="sgi.html">20. SGI IRIX Specific</A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-gl.html">20.8 gl </A>
</div>
</div>
<hr />
<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>