[Previous] [Contents] [Index] [Next]

PfLoadFont()

Preload a font within the font server

Synopsis:

#include <photon/Pf.h>

int PfLoadFont( const char *font,
                unsigned flags, 
                FontName fontused );

Description:

This function preloads a font (from disk into memory) within the font server in order to speed up subsequent use of that font. By default, a font is loaded only when required by a PgExtentText() or PgDrawText() call. The font parameter specifies the name of the desired font (e.g. helv12).

The flags parameter consists of zero or more of the PHFONT_LOAD_METRICS or PHFONT_LOAD_IMAGES flags, which indicate if the font metrics and/or bitmaps should be preloaded. If no flags are specified, the validity of the input font name is checked.

If fontused is non-NULL, the string it points to will be set to the real name of the font, which may be different than the input if the font is unknown or mapped as an alias to another font (via the fontmap file).

Returns:

0
Success.
-1
An error occurred; the value of errno is set appropriately.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgExtentText(), PgDrawText()


[Previous] [Contents] [Index] [Next]