PgSetFont()
Set text font
Synopsis:
void PgSetFont( char const *font_file );
Description:
This function sets the font for text subsequently drawn with PgDrawText() or PgDrawString(). Font names are in the format:
face size [style]
where face refers to the face of the font. For example:
- cour
- Courier
- helv
- Helvetica
- ncen
- New Century Schoolbook
- time
- Times Roman
- lu
- Lucida
- lut
- Lucida Terminal
- lub
- Lucida Bright
- swiss
- Swiss 721 (a scalable font)
The size argument refers to the ascent height in pixels of a proportional font or the total height of a fixed font.
The style argument is optional. If specified, it may contain any combination of the following:
- a
- anti-aliased
- b
- bold
- i
- italic
For a complete list of available fonts, check the /usr/photon/font directory.
Examples:
// use Helvetica, 12p, Normal PgSetFont( "helv12" ); // use Helvetica, 14p, Bold Italic PgSetFont( "helv14bi" ); // use Times Roman, 24p, Italic PgSetFont( "time24i" );
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PgDrawString(), PgDrawText(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat(), PgSetUnderline()
