Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fontm(3w) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

windows(1)

,fa(3w)

,gopen(3G)

,window(3w)

fontm(3w)

NAME

fontm − summary of font manager library routines

DISCUSSION

The font manager library, /usr/lib/libfontm.a, provides a high-performance alpha (textual) interface to graphics windows and bitmapped displays.  The font manager can handle different sizes of fonts and provides an x,y pixel interface (as opposed to the row and column interface of fast alpha). 

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) libraries. 

The header file /usr/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(3w) Make a loaded font the active font. 

fm_clipflag(3w) Set clipping flag.  This enables or disables the ability to write outside a window’s boundaries. 

fm_cliplim(3w) Set the clip limits; that is, define the area of a window in which clipping pertains. 

fm_colors(3w) Set the active font’s foreground and background colors. 

fm_fileinfo(3w) 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(3w) Set the direction for writing characters. 

fm_getname(3w) Return the path name of the font’s definition file. 

fm_load(3w) Load a font file into memory and activate it. 

fm_opt(3w) Optimize character generation if possible. 

fm_rasterinfo(3w) This routine returns size information (i.e., pixel width, height, and baseline) about the font’s character cells. 

fm_remove(3w) Remove a font from memory.  Once a font is removed from memory, it must be reloaded, via fm_load(3w), before it can be used again.

fm_str_len(3w) Return the pixel length of a character string.  The length is determined from the font size of the active font. 

fm_styleinfo(3w) Return style information about a font.  This information is returned in an escapecodes structure, as defined in /usr/include/fonticon.h. 

fm_write(3w) Use the active font to display characters. 

EXAMPLES

The following example compiles a program, named fontmprog.c, that calls font manager routines to display text in graphics windows. The program will run on a Series 300 low-resolution display using retained windows (thus the −ldd300l and −lddbyte options).

cc fontmprog.c −lfontm −ldd300l −lddbyte −lwindow −lsb1 −lsb2

SEE ALSO

windows(1),fa(3w),gopen(3G),window(3w). 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026