PfDecomposeStemToID(), PfDecomposeStemToIDCx()

Convert a stem name into a font ID

Synopsis:

#include <photon/Pf.h>

FontID * PfDecomposeStemToID( char const *pkszStem );

#include <font_api.h>
FontID* PfDecomposeStemToIDCx(
           struct _Pf_ctrl * context,
           char const * pkszStem );

Arguments:

context
(PfDecomposeStemToIDCx() only) A pointer to the font context to use, returned by PfAttachCx() or PfAttachDllCx().
pkszStem
A pointer to the stem to decompose to a FontID, for example primasansbts12.

Library:

PfDecomposeStemToID()
ph
PfDecomposeStemToIDCx()
font

Description:

These functions convert a complete font stem, such as helv12b, to a FontID representation. They parse pkszStem and query the font manager or server for the information pertinent to the font.

You're responsible for releasing the resources associated with the returned FontID structure. To do this, call the corresponding free font function, either PfFreeFont() or PfFreeFontCx().

Returns:

A pointer to a FontID, or NULL on failure.

Examples:

PfDecomposeStemToIDCx(): See the example for PfGetGlyphIndexCx().

Classification:

Photon

PfDecomposeStemToID()

Safety:
Interrupt handler No
Signal handler No
Thread No

PfDecomposeStemToIDCx()

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

PfConvertFontID(), PfConvertFontIDCx(), PfFindFont(), PfFindFontCx(), PfFontDescription(), PfFontDescriptionCx(), PfFontFlags(), PfFontFlagsCx(), PfFontSize(), PfFontSizeCx(), PfFreeFont(), PfFreeFontCx()

Fonts chapter of the Photon Programmer's Guide