1 \section{Built-in Module
\sectcode{fm
}}
4 This module provides access to the IRIS
{\em Font Manager
} library.
5 It is available only on Silicon Graphics machines.
6 See also:
4Sight User's Guide, Section
1, Chapter
5: Using the IRIS
9 This is not yet a full interface to the IRIS Font Manager.
10 Among the unsupported features are: matrix operations; cache
11 operations; character operations (use string operations instead); some
12 details of font info; individual glyph metrics; and printer matching.
14 It supports the following operations:
16 \renewcommand{\indexsubitem}{(in module fm)
}
17 \begin{funcdesc
}{init
}{}
18 Initialization function.
19 Calls
\code{fminit()
}.
20 It is normally not necessary to call this function, since it is called
21 automatically the first time the
\code{fm
} module is imported.
24 \begin{funcdesc
}{findfont
}{fontname
}
25 Return a font handle object.
26 Calls
\code{fmfindfont(
\var{fontname
})
}.
29 \begin{funcdesc
}{enumerate
}{}
30 Returns a list of available font names.
31 This is an interface to
\code{fmenumerate()
}.
34 \begin{funcdesc
}{prstr
}{string
}
35 Render a string using the current font (see the
\code{setfont()
} font
37 Calls
\code{fmprstr(
\var{string
})
}.
40 \begin{funcdesc
}{setpath
}{string
}
41 Sets the font search path.
42 Calls
\code{fmsetpath(string)
}.
43 (XXX Does not work!?!)
46 \begin{funcdesc
}{fontpath
}{}
47 Returns the current font search path.
50 Font handle objects support the following operations:
52 \renewcommand{\indexsubitem}{(font handle method)
}
53 \begin{funcdesc
}{scalefont
}{factor
}
54 Returns a handle for a scaled version of this font.
55 Calls
\code{fmscalefont(
\var{fh
},
\var{factor
})
}.
58 \begin{funcdesc
}{setfont
}{}
59 Makes this font the current font.
60 Note: the effect is undone silently when the font handle object is
62 Calls
\code{fmsetfont(
\var{fh
})
}.
65 \begin{funcdesc
}{getfontname
}{}
66 Returns this font's name.
67 Calls
\code{fmgetfontname(
\var{fh
})
}.
70 \begin{funcdesc
}{getcomment
}{}
71 Returns the comment string associated with this font.
72 Raises an exception if there is none.
73 Calls
\code{fmgetcomment(
\var{fh
})
}.
76 \begin{funcdesc
}{getfontinfo
}{}
77 Returns a tuple giving some pertinent data about this font.
78 This is an interface to
\code{fmgetfontinfo()
}.
79 The returned tuple contains the following numbers:
80 {\tt(
\var{printermatched
},
\var{fixed_width
},
\var{xorig
},
\var{yorig
},
81 \var{xsize
},
\var{ysize
},
\var{height
},
\var{nglyphs
})
}.
84 \begin{funcdesc
}{getstrwidth
}{string
}
85 Returns the width, in pixels, of the string when drawn in this font.
86 Calls
\code{fmgetstrwidth(
\var{fh
},
\var{string
})
}.