Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PfLoadFont(), PfLoadFontCx()

Preload a font within the font server

Synopsis:

#include <photon/Pf.h>
int PfLoadFont( const char *font,
                unsigned flags,
                FontName fontused );

#include <font_api.h>
int PfLoadFontCx( struct _Pf_ctrl * context,
                  const char * font,
                  unsigned flags,
                  FontName fontused );

Arguments:

context
(PfLoadFontCx() only) A pointer to the font context to use, returned by PfAttachCx() or PfAttachDllCx().
font
The name of the desired font, as created by PfGenerateFontName() or PfGenerateFontNameCx().
flags
Any combination of:

If you don't specify any flags, the function checks the validity of the input font name.

fontused
NULL, or a buffer where the function can store the real name of the font, which may be different from the input if the font is unknown or is mapped as an alias to another font (via the fontmap file).

Library:

PfLoadFont()
ph
PfLoadFontCx()
font

Description:

This function preloads a font (from disk into memory) within the font server to speed up subsequent use of the font. By default, a font is loaded only when required by PgExtentText() or PgDrawText().

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

Photon

PfLoadFont()

Safety:
Interrupt handler No
Signal handler No
Thread No

PfLoadFontCx()

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

PfGenerateFontName(), PfGenerateFontNameCx(), PgDrawText(), PgExtentText()

Fonts chapter of the Photon Programmer's Guide