Category Graphics and model display, Object ProText

Function ProTextFontNameToId


Description
Returns the identifier for the specified text font name.

NOTES:

  • The correspondence between font names and font identifiers stays constant during a Creo Parametric session, but may be different for different sessions.
  • To the Creo Parametric user, fonts are identified by names; in Creo Parametric TOOLKIT, they are identified by integer identifiers. This function translates between names and identifiers. The names must have the file extension .ndx added to them, such as font.ndx, filled.ndx.
Replacement in Object TOOLKIT: pfcDisplay::GetFontByName
Synopsis
#include <ProGraphic.h>
ProErrorProTextFontNameToId(
ProLine font_name
/* (In)
The name of the text font
*/
int* font_id
/* (Out)
The font identifier
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully retrieved the information.
PRO_TK_BAD_INPUTSThe input argument is invalid, or the font identifier is NULL.
PRO_TK_E_NOT_FOUNDThe function could not find a font identifier for the specified font name.

Manual References:

  1. User Interface: Basic Graphics: Controlling Text Fonts
  2. User Interface: Basic Graphics: Controlling Text Fonts

Sample Code References:

  1. pt_examples ( TestText.c )