CL_Font_Freetype Class Reference
[clanDisplay Font]

Freetype Font class. More...

#include <font_freetype.h>

Inheritance diagram for CL_Font_Freetype:

CL_Font List of all members.

Public Member Functions

Operations
void draw_text (CL_GraphicContext &gc, int x, int y, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
void draw_text (CL_GraphicContext &gc, float x, float y, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
void draw_text (CL_GraphicContext &gc, const CL_Pointf &position, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
CL_Size get_text_size (CL_GraphicContext &gc, const CL_StringRef &text)
 Calculate size of text string.
CL_FontMetrics get_font_metrics (CL_GraphicContext &gc)
 Retrieves font metrics description for the selected font.
int get_character_index (CL_GraphicContext &gc, const CL_String &text, const CL_Point &point)
 Get the character index at a specified point.
Construction
 CL_Font_Freetype ()
 Constructs freetype font.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_StringRef &typeface_name, int height)
 Constructs a Font Freetype.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_StringRef &typeface_name, int height, CL_IODevice &file)
 Constructs a Font Freetype.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_StringRef &typeface_name, int height, const CL_VirtualDirectory &directory)
 Constructs a Font Freetype.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_FontDescription &desc)
 Constructs a Font Freetype.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_FontDescription &desc, CL_IODevice &file)
 Constructs a Font Freetype.
 CL_Font_Freetype (CL_GraphicContext &gc, const CL_FontDescription &desc, const CL_VirtualDirectory &directory)
 Constructs a Font Freetype.
 ~CL_Font_Freetype ()
Attributes
CL_FontProvider_Freetype * get_provider () const
 Retrieves the font provider.
Operations
void set_texture_group (CL_TextureGroup &new_texture_group)
 Set the texture font to use a specified texture group.
Attributes
bool is_null ()
 Is Null.
Operations
void draw_text (CL_GraphicContext &gc, int x, int y, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
void draw_text (CL_GraphicContext &gc, float x, float y, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
void draw_text (CL_GraphicContext &gc, const CL_Pointf &position, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white)
 Print text on gc.
CL_Size get_text_size (CL_GraphicContext &gc, const CL_StringRef &text)
 Calculate size of text string.
CL_FontMetrics get_font_metrics (CL_GraphicContext &gc)
 Retrieves font metrics description for the selected font.
int get_character_index (CL_GraphicContext &gc, const CL_String &text, const CL_Point &point)
 Get the character index at a specified point.

Detailed Description

Freetype Font class.


Constructor & Destructor Documentation

CL_Font_Freetype::CL_Font_Freetype  ) 
 

Constructs freetype font.

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_StringRef typeface_name,
int  height
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
typeface_name = String Ref
height = value

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_StringRef typeface_name,
int  height,
CL_IODevice file
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
typeface_name = String Ref
height = value
file = IODevice

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_StringRef typeface_name,
int  height,
const CL_VirtualDirectory directory
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
typeface_name = String Ref
height = value
directory = Virtual Directory

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_FontDescription desc
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
desc = Font Description

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_FontDescription desc,
CL_IODevice file
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
desc = Font Description
file = IODevice

CL_Font_Freetype::CL_Font_Freetype CL_GraphicContext gc,
const CL_FontDescription desc,
const CL_VirtualDirectory directory
 

Constructs a Font Freetype.

Parameters:
gc = Graphic Context
desc = Font Description
directory = Virtual Directory

CL_Font_Freetype::~CL_Font_Freetype  ) 
 


Member Function Documentation

void CL_Font::draw_text CL_GraphicContext gc,
const CL_Pointf position,
const CL_StringRef text,
const CL_Colorf color = CL_Colorf::white
[inherited]
 

Print text on gc.

Multiline text (seperated by /n) is supported

Parameters:
gc = Graphic Context
position = Dest position
text = The text to draw
color = The text color

void CL_Font::draw_text CL_GraphicContext gc,
float  x,
float  y,
const CL_StringRef text,
const CL_Colorf color = CL_Colorf::white
[inherited]
 

Print text on gc.

Multiline text (seperated by /n) is supported

Parameters:
gc = Graphic Context
x = X position
y = Y position
text = The text to draw
color = The text color

void CL_Font::draw_text CL_GraphicContext gc,
int  x,
int  y,
const CL_StringRef text,
const CL_Colorf color = CL_Colorf::white
[inherited]
 

Print text on gc.

Multiline text (seperated by /n) is supported

Parameters:
gc = Graphic Context
x = X position
y = Y position
text = The text to draw
color = The text color

int CL_Font::get_character_index CL_GraphicContext gc,
const CL_String text,
const CL_Point point
[inherited]
 

Get the character index at a specified point.

Multiline text (seperated by /n) is supported

Parameters:
gc = The Graphic Context
text = The string
point = The point
Returns:
The character index. -1 = Not at specified point

CL_FontMetrics CL_Font::get_font_metrics CL_GraphicContext gc  )  [inherited]
 

Retrieves font metrics description for the selected font.

CL_FontProvider_Freetype* CL_Font_Freetype::get_provider  )  const
 

Retrieves the font provider.

Reimplemented from CL_Font.

CL_Size CL_Font::get_text_size CL_GraphicContext gc,
const CL_StringRef text
[inherited]
 

Calculate size of text string.

Multiline text (seperated by /n) is supported

Note: The height also includes whitespace (to give the maximum font height), so "." and "X" returns the same height.
The width is the pixel width

bool CL_Font::is_null  )  [inherited]
 

Is Null.

Returns:
true = null

void CL_Font_Freetype::set_texture_group CL_TextureGroup new_texture_group  ) 
 

Set the texture font to use a specified texture group.


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:36 2009 for ClanLib by  doxygen 1.4.6