ClanLib
2.3.7
|
Freetype Font class. More...
#include <font_freetype.h>
Public Member Functions | |
Construction | |
CL_Font_Freetype () | |
Constructs freetype font. More... | |
CL_Font_Freetype (const CL_StringRef &typeface_name, int height) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_StringRef &typeface_name, int height, CL_IODevice &file) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_StringRef &typeface_name, int height, const CL_VirtualDirectory &directory) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_FontDescription &desc) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_FontDescription &desc, CL_IODevice &file) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_FontDescription &desc, const CL_VirtualDirectory &directory) | |
Constructs a Font Freetype. More... | |
CL_Font_Freetype (const CL_StringRef &resource_id, CL_ResourceManager *resources) | |
Constructs a Font Freetype. More... | |
~CL_Font_Freetype () | |
Attributes | |
CL_FontProvider_Freetype * | get_provider () const |
Retrieves the font provider. More... | |
Operations | |
void | set_texture_group (CL_TextureGroup &new_texture_group) |
Set the texture font to use a specified texture group. More... | |
Attributes | |
bool | is_null () const |
Is Null. More... | |
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. More... | |
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. More... | |
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. More... | |
void | draw_text_ellipsis (CL_GraphicContext &gc, int x, int y, CL_Rect content_box, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white) |
Print text on gc adding elipses if it does not fit. More... | |
void | draw_text_ellipsis (CL_GraphicContext &gc, float x, float y, CL_Rectf content_box, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white) |
Print text on gc adding elipses if it does not fit. More... | |
void | draw_text_ellipsis (CL_GraphicContext &gc, const CL_Pointf &position, CL_Rectf content_box, const CL_StringRef &text, const CL_Colorf &color=CL_Colorf::white) |
Print text on gc adding elipses if it does not fit. More... | |
CL_Size | get_text_size (CL_GraphicContext &gc, const CL_StringRef &text) |
Calculate size of text string. More... | |
CL_Size | get_glyph_size (CL_GraphicContext &gc, unsigned int glyph) |
Gets the size of a specified glyph. More... | |
CL_FontMetrics | get_font_metrics () |
Retrieves font metrics description for the selected font. More... | |
int | get_character_index (CL_GraphicContext &gc, const CL_String &text, const CL_Point &point) |
Get the character index at a specified point. More... | |
Freetype Font class.
CL_Font_Freetype::CL_Font_Freetype | ( | ) |
Constructs freetype font.
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_StringRef & | typeface_name, |
int | height | ||
) |
Constructs a Font Freetype.
typeface_name | = String Ref |
height | = value |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_StringRef & | typeface_name, |
int | height, | ||
CL_IODevice & | file | ||
) |
Constructs a Font Freetype.
typeface_name | = String Ref |
height | = value |
file | = IODevice |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_StringRef & | typeface_name, |
int | height, | ||
const CL_VirtualDirectory & | directory | ||
) |
Constructs a Font Freetype.
typeface_name | = String Ref |
height | = value |
directory | = Virtual Directory |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_FontDescription & | desc) |
Constructs a Font Freetype.
desc | = Font Description |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_FontDescription & | desc, |
CL_IODevice & | file | ||
) |
Constructs a Font Freetype.
desc | = Font Description |
file | = IODevice |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_FontDescription & | desc, |
const CL_VirtualDirectory & | directory | ||
) |
Constructs a Font Freetype.
desc | = Font Description |
directory | = Virtual Directory |
CL_Font_Freetype::CL_Font_Freetype | ( | const CL_StringRef & | resource_id, |
CL_ResourceManager * | resources | ||
) |
Constructs a Font Freetype.
resource_id | = String Ref |
resources | = Resource Manager |
CL_Font_Freetype::~CL_Font_Freetype | ( | ) |
|
inherited |
Print text on gc.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
|
inherited |
Print text on gc.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
|
inherited |
Print text on gc.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
position | = Dest position |
text | = The text to draw |
color | = The text color |
|
inherited |
Print text on gc adding elipses if it does not fit.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
|
inherited |
Print text on gc adding elipses if it does not fit.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
|
inherited |
Print text on gc adding elipses if it does not fit.
Multiline text (seperated by /n) is supported
gc | = Graphic Context |
position | = Dest position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
|
inherited |
Get the character index at a specified point.
Multiline text (seperated by /n) is supported
gc | = The Graphic Context |
text | = The string |
point | = The point |
|
inherited |
Retrieves font metrics description for the selected font.
|
inherited |
Gets the size of a specified glyph.
The size is the increment value to the next glyph
glyph | = The glyph to get |
CL_FontProvider_Freetype* CL_Font_Freetype::get_provider | ( | ) | const |
Retrieves the font provider.
|
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
The size is the increment value to the next glyph
|
inherited |
Is Null.
void CL_Font_Freetype::set_texture_group | ( | CL_TextureGroup & | new_texture_group) |
Set the texture font to use a specified texture group.