FM_RASTERINFO(3W)
Series 300 and 500 Only
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.
width
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, the width and height are the maxima 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.
HARDWARE DEPENDENCIES
Series 500:
Font manager routines do not support HP-15 (2-byte) fonts on Series 500.
SEE ALSO
The "Font Manager" chapter of the HP Windows/9000 Programmer’s Manual and the following reference pages: fm_fileinfo(3W),fm_load(3W).
DIAGNOSTICS
A -1 is refurned if gfd or fontid is not valid; otherwise, 0 is returned. See errno(2) for more information.
Hewlett-Packard Company — May 11, 2021