Main Page   File List   Globals  

FBfont.c File Reference

Font functions. More...

Go to the source code of this file.

Functions

int FB_change_font (char *psf_file)
int FB_putc (int c, int x, int y, FB_pixel col)
int FB_printf (int x, int y, FB_pixel col, char *format,...)


Detailed Description

All font loading and printing is grouped here.
begin : Fri Feb 8 2002
copyright : (C) 2000 by Daniele Venzano
email : venza@users.sf.net

Definition in file FBfont.c.


Function Documentation

int FB_change_font char *    psf_file
 

Change the font set used to draw caracters. Can also use psf files compressed with gzip.

Parameters:
psf_file  Path to the .psf or .psf.gz file that conteins the new font set
Return values:
OK  No error
PARAM_ERR  The file was not found or it wasn't in psf format

Definition at line 34 of file FBfont.c.

Referenced by FB_initlib().

int FB_putc int    c,
int    x,
int    y,
FB_pixel    col
 

Same as putc function from your favourite libc.

Parameters:
c  ASCII code of the caracter to display
x,y  position of the upper left corner of the caracter
col  color of the caracter
Return values:
OK  No error
PARAM_ERR  You requested a glyph with a code > 255 using a font set with only 255 gliphs

Definition at line 86 of file FBfont.c.

References FB_putpixel().

Referenced by FB_printf().

int FB_printf int    x,
int    y,
FB_pixel    col,
char *    format,
...   
 

Same as usula printf, extend to draw everywhere in the screen

Parameters:
x,y  Position of the upper left corner of the first caracter
col  Color of the whole string
format  Format string of the output, same format as printf, but only \r, \n %d %x %c %g %% are supported
...  format variables
Return values:
0  Should return something usefull, but will return always 0

Definition at line 107 of file FBfont.c.

References FB_putc().


Generated on Sat Jul 5 09:04:52 2003 for LibFB by doxygen1.2.18