SFont

Data Structures

struct  OSL_SFLETTER
 
struct  OSL_SFONT
 

Functions

OSL_SFONToslLoadSFontFile (char *filename, int pixelFormat)
 
void oslDeleteSFont (OSL_SFONT *sfont)
 
int oslGetSFontTextWidth (OSL_SFONT *sfont, char *text)
 
int oslSFontDrawText (OSL_SFONT *sfont, int x, int y, char *text)
 

Detailed Description

Functions to manage SFonts

Function Documentation

OSL_SFONT* oslLoadSFontFile ( char *  filename,
int  pixelFormat 
)

Load an SFont Returns a pointer to the loaded OSL_SFONT or NULL

Parameters
filenamefile name
pixelFormatpixel format
void oslDeleteSFont ( OSL_SFONT sfont)

Delete a loaded SFont

Parameters
sfontSFont to delete
int oslGetSFontTextWidth ( OSL_SFONT sfont,
char *  text 
)

Get the text width using a SFont Returns width in pixel of the string rendered with the given SFont

Parameters
sfontSFont
textText to measure
int oslSFontDrawText ( OSL_SFONT sfont,
int  x,
int  y,
char *  text 
)

Print a string using SFont Returns the string end position

Parameters
sfontSFont to use
xX position
yY position
textText to print