<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<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>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<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>
<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>
<!--End of Navigation Panel-->
<H1><A NAME=
"SECTION0022700000000000000000">
20.7 <tt class=
"module">fm
</tt> --
<em>Font Manager
</em> interface
</A>
<p class=
"availability">Availability:
<span
class=
"platform">IRIX
</span>.
</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
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.
It supports the following operations:
<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>
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><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>
Return a font handle object.
Calls
<code>fmfindfont(
<var>fontname
</var>)
</code>.
<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>
Returns a list of available font names.
This is an interface to
<tt class=
"cfunction">fmenumerate()
</tt>.
<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>
Render a string using the current font (see the
<tt class=
"function">setfont()
</tt> font
Calls
<code>fmprstr(
<var>string
</var>)
</code>.
<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>
Sets the font search path.
Calls
<code>fmsetpath(
<var>string
</var>)
</code>.
<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>
Returns the current font search path.
Font handle objects support the following operations:
<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>
Returns a handle for a scaled version of this font.
Calls
<code>fmscalefont(
<var>fh
</var>,
<var>factor
</var>)
</code>.
<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>
Makes this font the current font.
Note: the effect is undone silently when the font handle object is
Calls
<code>fmsetfont(
<var>fh
</var>)
</code>.
<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>
Returns this font's name.
Calls
<code>fmgetfontname(
<var>fh
</var>)
</code>.
<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>
Returns the comment string associated with this font.
Raises an exception if there is none.
Calls
<code>fmgetcomment(
<var>fh
</var>)
</code>.
<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>
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><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>
Returns the width, in pixels, of
<var>string
</var> when drawn in this font.
Calls
<code>fmgetstrwidth(
<var>fh
</var>,
<var>string
</var>)
</code>.
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<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>
<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>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.