fontm(3G)
NAME
fontm − summary of Font Manager library routines
DISCUSSION
The Font Manager provides a high-performance alpha (textual) interface to graphics windows and bitmapped displays. The Font Manager libraries are <sb-lib>/libfontm.a (for archive libraries) and
<sb-lib>/libfontm.sl (for shared libraries). These libraries can handle different sizes of fonts and provide an x,y pixel interface (as opposed to the row and column interface of Fast Alpha). Note that in this section, the actual path names of the directories given in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.
All Font Manager library calls require a file descriptor from gopen(3G) which may be that of a bitmapped display device or of a graphics window.
Programs that call Font Manager routines must link in the Font Manager (-lfontm) and Starbase (−lsb1 −lsb2 for archive; or −lsb for shared) libraries.
The header file <sb-include>/fonticon.h contains type and constant definitions used by Font Manager routines. Programs should use these definitions when calling Font Manager library routines.
Font manager library routines are summarized below. For more information on each routine, consult its reference page.
fm_activate(3G) Make a loaded font the active font.
fm_clipflag(3G) Set clipping flag. This enables or disables the ability to write outside a window’s boundaries.
fm_cliplim(3G) Set the clip limits; that is, define the area of a window in which clipping pertains.
fm_colors(3G) Set the active font’s foreground and background colors.
fm_fileinfo(3G) Given the path name of a font file, this routine returns size information (i.e., pixel width, height, and baseline) about the font’s character cells.
fm_fontdir(3G) Set the direction for writing characters.
fm_getname(3G) Return the path name of the font’s definition file.
fm_load(3G) Load a font file into memory and activate it.
fm_opt(3G) Optimize character generation if possible.
fm_rasterinfo(3G) This routine returns size information (i.e., pixel width, height, and baseline) about the font’s character cells.
fm_remove(3G) Remove a font from memory. Once a font is removed from memory, it must be reloaded, via fm_load(3G), before it can be used again.
fm_sixteen_bit(3G) This routine enables sixteen-bit mode for raster-alpha output as indicated by flag.
fm_str_len(3G) Return the pixel length of a character string. The length is determined from the font size of the active font.
fm_styleinfo(3G) Return style information about a font. This information is returned in an escapecodes structure, as defined in <sb-include>/fonticon.h (the actual path name of the directory given in angle brackets depends on the file system structure; see the Graphics Administration Guide for details).
fm_write(3G) Use the active font to display characters.
EXAMPLES
The following example compiles a program named fontmprog.c using shared libraries. This program calls Font Manager routines to display text in graphics windows. In this section, the actual path names of the directories given in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.
cc −I <sb-include> fontmprog.c −L <sb-lib>
-L <x11r5> −lfa −lfontm −lXwindow −lsb −lX11 −lXhp11 −ldld −lfa −lfontm −lXwindow −lsb −lX11 −lXhp11 −ldld
SEE ALSO
fa(3G). Starbase Reference: gopen(3G).
Hewlett-Packard Company — HP-UX Release 10.0