Public Member Functions | |
CFont (const char *, bool alpha=true) | |
Creates a font from an image file. | |
void | printString (double x, double y, double t, const char *s) |
Prints the string s at (x,y) with size t. | |
void | printStringN (double x, double y, double t, const char *s, int n) |
Prints N first characters of string s at (x,y) with size t. | |
void | printStringNeed (double t, const char *s, double *w, double *h) |
Retrieve the width and height needed by printString to print string s with size t. |
Fonts are images with all characters on a line. There must be at least on pixel of pure black between two characters.
The character set is
!"#$&'()*+,-./0123456789:;<=>?[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
Note that a default font is provided in libtexture/font/default.tga (this font as a low resolution to have a small memory cost)
|
Creates a font from an image file. If alpha is true the black background is replaced by transparancy. |
|
Prints the string s at (x,y) with size t. Note that the text is printed in a plane but that nothing prevents using an appropriate modelview to draw it in 3d. |