![]() |
![]() |
![]() |
![]() |
Set the text font
void PgSetFont( char const *ff );
ph
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().
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 ); }
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PfGenerateFontName(), PgDrawString(), PgDrawText(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat(), PgSetUnderline()
"Drawing attributes" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |