ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Library Reference
20. SGI IRIX Specific Services
20.1 al -- Audio functions on the SGI
20.2 AL -- Constants used with the al module
20.3 cd -- CD-ROM access on SGI systems
20.4 fl -- FORMS library for graphical user interfaces
20.5 FL -- Constants used with the fl module
20.6 flp -- Functions for loading stored FORMS designs
20.7 fm -- Font Manager interface
20.8 gl -- Graphics Library interface
20.9 DEVICE -- Constants used with the gl module
20.10 GL -- Constants used with the gl module
20.11 imgfile -- Support for SGI imglib files
20.12 jpeg -- Read and write JPEG files

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Library Reference >> 20. SGI IRIX Specific Services
ActivePython 2.4 documentation

20.7 fm -- Font Manager interface

Availability: IRIX.

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).
See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved