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

PgSetFont()

Set the text font

Synopsis:

void PgSetFont( char const *ff );

Library:

ph

Description:

This function sets the font for text subsequently drawn with PgDrawText() or PgDrawString(). The ff argument is a pointer to a font identifier, which you should create by calling PfGenerateFontName().

Examples:

char font_name[MAX_FONT_TAG];

// Use Helvetica, 12p, Normal:

if (PfGenerateFontName( "Helvetica", 0, 12, 
                        font_name ) != NULL) {
   PgSetFont( font_name );
}

// Use Helvetica, 14p, Bold Italic:

if (PfGenerateFontName( "Helvetica", 
                        PF_STYLE_BOLD | PF_STYLE_ITALIC,
                        14, font_name ) != NULL ) {
   PgSetFont( font_name );
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PfGenerateFontName(), PgDrawString(), PgDrawText(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat(), PgSetUnderline()

"Drawing attributes" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


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