fm_rasterinfo(3G)
NAME
fm_rasterinfo − return the size of cells in a font
SYNOPSIS
int fm_rasterinfo ( gfd, fontid, width, height, baseline );
int gfd, fontid;
int *width,*height,*baseline;
DESCRIPTION
gfd is an integer file descriptor for an gopened device interface.
fontid font id as returned by fm_load.
Gidth width of 1-byte character cells in the font.
height height of character cells in the font.
baseline baseline of character cells in the font.
DISCUSSION
For the designated font, the width, height and baseline for the character cells are returned. The returned cell width is the width of 1-byte characters, even if the designated font is a HP-15 (2-byte) font that includes both 1- and 2-byte characters. The 2-byte characters are twice as wide as the 1-byte characters. The returned value for baseline is for the 1-byte character cell. The baseline of the 2-byte characters is equal to the descender line of 1/2-byte characters.
This library call is useful for determining what size to create a window that will contain fixed text.
For proportional fonts, width and height are the maximums, respectively, of the widths and heights of the character cells in the font. The baseline is sometimes useful for lining up characters in different-sized fonts.
SEE ALSO
The "Font Manager" chapter of the Fast Alpha/Font Manager Programmer’s Manual and the following reference pages: fm_fileinfo(3G), fm_load(3G).
DIAGNOSTICS
A −1 is returned if gfd or fontid is not valid; otherwise, 0 is returned. See errno(2) in HP-UX Reference for more information.
Hewlett-Packard Company — HP-UX Release 10.0