
This class defines the parameters of a font (size, style, ...)
Public Types | |
| enum | Style { NORMAL = 0x00, BOLD = 0x01, ITALIC = 0x02, UNDERLINE = 0x04 } |
| Font styles. More... | |
Public Member Functions | |
| PG_Font (const char *fontfile, int size=14, int index=0) | |
| Construct a PG_Font object. | |
| virtual | ~PG_Font () |
| int | GetFontAscender () |
| int | GetFontDescender () |
| int | GetFontHeight () |
| Get the absolute height of the font (in pixels). | |
| void | SetColor (const PG_Color &c) |
| Set the color of the font. | |
| PG_Color | GetColor () |
| Get the current color of the font. | |
| void | SetAlpha (int a) |
| Set the transparency of the font. | |
| int | GetAlpha () |
| Get the transparency of the font. | |
| void | SetSize (int s) |
| Set the size of the font. | |
| int | GetSize () |
| Get the size of the font. | |
| void | SetStyle (Style s) |
| Style | GetStyle () |
| bool | SetName (const char *fontfile) |
| Set the name (filename) of the font. | |
| const char * | GetName () |
| Get the current name of the font (filename). | |
| void | SetIndex (int index) |
| int | GetIndex () |
Friends | |
| class | PG_FontEngine |
|
|
Font styles.
|
|
||||||||||||||||
|
Construct a PG_Font object.
|
|
|
|
|
|
Get the transparency of the font.
|
|
|
Get the current color of the font.
|
|
|
|
|
|
|
|
|
Get the absolute height of the font (in pixels).
|
|
|
|
|
|
Get the current name of the font (filename).
|
|
|
Get the size of the font.
|
|
|
|
|
|
Set the transparency of the font.
|
|
|
Set the color of the font.
|
|
|
|
|
|
Set the name (filename) of the font.
|
|
|
Set the size of the font.
|
|
|
|
|
|
|