| 1 | \section{\module{fm} ---
|
|---|
| 2 | \emph{Font Manager} interface}
|
|---|
| 3 |
|
|---|
| 4 | \declaremodule{builtin}{fm}
|
|---|
| 5 | \platform{IRIX}
|
|---|
| 6 | \modulesynopsis{\emph{Font Manager} interface for SGI workstations.}
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 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.''
|
|---|
| 15 |
|
|---|
| 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.
|
|---|
| 20 |
|
|---|
| 21 | It supports the following operations:
|
|---|
| 22 |
|
|---|
| 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.
|
|---|
| 28 | \end{funcdesc}
|
|---|
| 29 |
|
|---|
| 30 | \begin{funcdesc}{findfont}{fontname}
|
|---|
| 31 | Return a font handle object.
|
|---|
| 32 | Calls \code{fmfindfont(\var{fontname})}.
|
|---|
| 33 | \end{funcdesc}
|
|---|
| 34 |
|
|---|
| 35 | \begin{funcdesc}{enumerate}{}
|
|---|
| 36 | Returns a list of available font names.
|
|---|
| 37 | This is an interface to \cfunction{fmenumerate()}.
|
|---|
| 38 | \end{funcdesc}
|
|---|
| 39 |
|
|---|
| 40 | \begin{funcdesc}{prstr}{string}
|
|---|
| 41 | Render a string using the current font (see the \function{setfont()} font
|
|---|
| 42 | handle method below).
|
|---|
| 43 | Calls \code{fmprstr(\var{string})}.
|
|---|
| 44 | \end{funcdesc}
|
|---|
| 45 |
|
|---|
| 46 | \begin{funcdesc}{setpath}{string}
|
|---|
| 47 | Sets the font search path.
|
|---|
| 48 | Calls \code{fmsetpath(\var{string})}.
|
|---|
| 49 | (XXX Does not work!?!)
|
|---|
| 50 | \end{funcdesc}
|
|---|
| 51 |
|
|---|
| 52 | \begin{funcdesc}{fontpath}{}
|
|---|
| 53 | Returns the current font search path.
|
|---|
| 54 | \end{funcdesc}
|
|---|
| 55 |
|
|---|
| 56 | Font handle objects support the following operations:
|
|---|
| 57 |
|
|---|
| 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})}.
|
|---|
| 62 | \end{funcdesc}
|
|---|
| 63 |
|
|---|
| 64 | \begin{funcdesc}{setfont}{}
|
|---|
| 65 | Makes this font the current font.
|
|---|
| 66 | Note: the effect is undone silently when the font handle object is
|
|---|
| 67 | deleted.
|
|---|
| 68 | Calls \code{fmsetfont(\var{fh})}.
|
|---|
| 69 | \end{funcdesc}
|
|---|
| 70 |
|
|---|
| 71 | \begin{funcdesc}{getfontname}{}
|
|---|
| 72 | Returns this font's name.
|
|---|
| 73 | Calls \code{fmgetfontname(\var{fh})}.
|
|---|
| 74 | \end{funcdesc}
|
|---|
| 75 |
|
|---|
| 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})}.
|
|---|
| 80 | \end{funcdesc}
|
|---|
| 81 |
|
|---|
| 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{)}.
|
|---|
| 89 | \end{funcdesc}
|
|---|
| 90 |
|
|---|
| 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})}.
|
|---|
| 94 | \end{funcdesc}
|
|---|