Font.h File Reference

#include <SFML/Graphics/Glyph.h>

Go to the source code of this file.


Typedefs

typedef sfFont sfFont
 sfFont is the low-level class for loading and manipulating character fonts (see sfString)

Functions

CSFML_API sfFontsfFont_Create ()
 Create a new empty font.
CSFML_API sfFontsfFont_CreateFromFile (const char *Filename, unsigned int CharSize, const sfUint32 *Charset)
 Create a new font from a file.
CSFML_API sfFontsfFont_CreateFromMemory (const char *Data, size_t SizeInBytes, unsigned int CharSize, const sfUint32 *Charset)
 Create a new image font a file in memory.
CSFML_API void sfFont_Destroy (sfFont *Font)
 Destroy an existing font.
CSFML_API unsigned int sfFont_GetCharacterSize (sfFont *Font)
 Get the base size of characters in a font; All glyphs dimensions are based on this value.
CSFML_API sfFontsfFont_GetDefaultFont ()
 Get the built-in default font (Arial).

Typedef Documentation

typedef struct sfFont sfFont

sfFont is the low-level class for loading and manipulating character fonts (see sfString)

Definition at line 38 of file Font.h.


Function Documentation

CSFML_API sfFont* sfFont_Create (  ) 

Create a new empty font.

Returns:
A new sfFont object, or NULL if it failed

CSFML_API sfFont* sfFont_CreateFromFile ( const char *  Filename,
unsigned int  CharSize,
const sfUint32 *  Charset 
)

Create a new font from a file.

Parameters:
Filename : Path of the font file to load
CharSize : Size of characters in bitmap - the bigger, the higher quality
Charset : Characters set to generate (just pass NULL to get the default charset)
Returns:
A new sfFont object, or NULL if it failed

CSFML_API sfFont* sfFont_CreateFromMemory ( const char *  Data,
size_t  SizeInBytes,
unsigned int  CharSize,
const sfUint32 *  Charset 
)

Create a new image font a file in memory.

Parameters:
Data : Pointer to the file data in memory
SizeInBytes : Size of the data to load, in bytes
CharSize : Size of characters in bitmap - the bigger, the higher quality
Charset : Characters set to generate (just pass NULL to get the default charset)
Returns:
A new sfFont object, or NULL if it failed

CSFML_API void sfFont_Destroy ( sfFont Font  ) 

Destroy an existing font.

Parameters:
Font : Font to delete

CSFML_API unsigned int sfFont_GetCharacterSize ( sfFont Font  ) 

Get the base size of characters in a font; All glyphs dimensions are based on this value.

Parameters:
Font : Font object
Returns:
Base size of characters

CSFML_API sfFont* sfFont_GetDefaultFont (  ) 

Get the built-in default font (Arial).

Returns:
Pointer to the default font