ClanSoft logo
ClanSoft logo

    CL_Font

ClanLib's font class.

Description

This class allows you to easilly draw text onto the backbuffer or to a renderer target.

The font can be created in two ways. Either it is loaded from a resource, or it is created using the font description interface. The font and its description have the same relationship/functionality as the surface and its provider.

Please read the CL_Font_Description page if you want an description on how to create your a font.

Class members

enum alignments
static CL_Font *create(CL_Font_Description *font_desc)
static CL_Font *load( const char *resource_id, CL_ResourceManager *resource_manager)
CL_Font(CL_Font_Description *provider)
CL_Font( const char *resource_id, CL_ResourceManager *manager)
CL_Font(const CL_Font &font)
virtual ~CL_Font()
int get_height()
int get_text_width(const char *text)
int get_char_width(const char character)
void print_left( int x, int y, const char *text)
void print_left( int x, int y, float scale_x, float scale_y, const char *text)
void print_center( int x, int y, const char *text)
void print_right( int x, int y, const char *text)
void put_target( int x, int y, const char *text, CL_Target *target, int alignment = ALIGN_LEFT)
CL_Font(class CL_Font_Generic *impl)
class CL_Font_Generic *impl

See Also

None


Back to index



This page was built using the Perceps documentation system.