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