ufmGetFontInfo(3w)ufmGetFontInfo(3w)NAMEufmGetFontInfo - get font information
C SYNOPSIS
#include <ufm.h>
int ufmGetFontInfo(unsigned int typefaceHandle, int pixelSize,
ufmFont **font)
DESCRIPTIONufmGetFontInfo gets the information for a specified font.
typefaceHandle specifies the handle for an open typeface. Use the
function ufmOpenTypeface to open a typeface, and get a handle for that
typeface.
pixelSize specifies a font size in pixels. If you want to get the
information for the outline font in a specified typeface, then specify 0
for the font pixel size.
ufmGetFontInfo uses the argument font to return a pointer to a data
structure of the type ufmFont that it has allocated. If ufmGetFontInfo
does not find a specified font, it returns NULL.
You may want to request one of the existing bitmap fonts by specifying
its pixel size. If you are not sure which bitmap sizes are available for
the typeface you want to specify, use the function ufmGetTypefaceInfo to
find out which bitmap sizes are available for that typeface. If you
specify an intermediate pixel size, there may be a delay, because a new
bitmap font may have to be created by scaling the corresponding outline
font or an existing bitmap font. Character bitmaps produced by the
automatic scaling of fonts may not look as good as hand-tuned character
bitmaps at standard sizes.
When your program is finished with the data structure font, it can call
the function ufmFreeFontInfo to free the memory allocated for that data
structure by ufmGetFontInfo.
SEE ALSOufmFreeFontInfo(3w), ufmGetTypefaceInfo(3w), ufmOpenTypeface(3w).
DIAGNOSTICS
If ufmGetFontInfo is not able to allocate the memory it needs, it will
return the value UFM_OUT_OF_MEMORY. If the values of one or more
arguments are not valid, ufmGetFontInfo will return the value
UFM_INVALID_VALUE. UFM_OUT_OF_MEMORY and UFM_INVALID_VALUE are defined
in the header file <ufm.h>.
Page 1