Copyright (C) 2000-2012 |
GNU Info (python2.1-lib.info)fm_Font Manager_ interface ======================== _Font Manager_ interface for SGI workstations. This module provides access to the IRIS _Font Manager_ library. It is available only on Silicon Graphics machines. See also: _4Sight User's Guide_, section 1, chapter 5: "Using the IRIS Font Manager." 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: `init()' Initialization function. Calls `fminit()'. It is normally not necessary to call this function, since it is called automatically the first time the `fm' module is imported. `findfont(fontname)' Return a font handle object. Calls `fmfindfont(FONTNAME)'. `enumerate()' Returns a list of available font names. This is an interface to `fmenumerate()'. `prstr(string)' Render a string using the current font (see the `setfont()' font handle method below). Calls `fmprstr(STRING)'. `setpath(string)' Sets the font search path. Calls `fmsetpath(STRING)'. (XXX Does not work!?!) `fontpath()' Returns the current font search path. Font handle objects support the following operations: `scalefont(factor)' Returns a handle for a scaled version of this font. Calls `fmscalefont(FH, FACTOR)'. `setfont()' Makes this font the current font. Note: the effect is undone silently when the font handle object is deleted. Calls `fmsetfont(FH)'. `getfontname()' Returns this font's name. Calls `fmgetfontname(FH)'. `getcomment()' Returns the comment string associated with this font. Raises an exception if there is none. Calls `fmgetcomment(FH)'. `getfontinfo()' Returns a tuple giving some pertinent data about this font. This is an interface to `fmgetfontinfo()'. The returned tuple contains the following numbers: `('PRINTERMATCHED, FIXED_WIDTH, XORIG, YORIG, XSIZE, YSIZE, HEIGHT, NGLYPHS`)'. `getstrwidth(string)' Returns the width, in pixels, of STRING when drawn in this font. Calls `fmgetstrwidth(FH, STRING)'. |