Functions to manage SFonts.
More...
Functions to manage SFonts.
◆ oslLoadSFontFile()
OSL_SFONT * oslLoadSFontFile |
( |
char * | filename, |
|
|
int | pixelFormat ) |
Load an SFont from a file.
- Parameters
-
filename | The name of the file to load the SFont from. |
pixelFormat | The pixel format to use for the SFont. |
- Returns
- A pointer to the loaded OSL_SFONT, or NULL on failure.
◆ oslDeleteSFont()
Delete a loaded SFont.
- Parameters
-
sfont | The SFont to delete. |
◆ oslGetSFontTextWidth()
int oslGetSFontTextWidth |
( |
OSL_SFONT * | sfont, |
|
|
char * | text ) |
Get the text width using an SFont.
- Parameters
-
sfont | The SFont to use for measurement. |
text | The text string to measure. |
- Returns
- The width in pixels of the string rendered with the given SFont.
◆ oslSFontDrawText()
int oslSFontDrawText |
( |
OSL_SFONT * | sfont, |
|
|
int | x, |
|
|
int | y, |
|
|
char * | text ) |
Print a string using an SFont.
- Parameters
-
sfont | The SFont to use for printing. |
x | The X position on the screen to start printing. |
y | The Y position on the screen to start printing. |
text | The text string to print. |
- Returns
- The X position of the end of the rendered string.