#include <font_system.h>
Inheritance diagram for CL_Font_System:

Operations | |
| void | set_texture_group (CL_TextureGroup &new_texture_group) |
| Set the texture font to use a specified texture group. | |
| void | load_font (CL_GraphicContext &context, const CL_FontDescription &desc) |
| Load a system font (for use by insert_glyph to load text from a system font). | |
| void | free_font () |
| Free the system font when it is no longer required. | |
| void | insert_glyph (CL_GraphicContext &gc, CL_Font_System_Position &position, CL_PixelBuffer &pixel_buffer) |
| Insert a glyph from a pixel buffer. | |
| void | insert_glyph (CL_GraphicContext &gc, const CL_StringRef &text) |
| Insert glyphs from a text string (using to system font). | |
| void | set_font_metrics (const CL_FontMetrics &metrics) |
| Set the font metrics for the bitmap font. This is done automatically if the font is loaded from the system font. | |
| static void | register_font (const CL_StringRef &font_filename, const CL_StringRef &font_typeface) |
| Registers a font for lookup when creating fonts. | |
Public Member Functions | |
Construction | |
| CL_Font_System () | |
| Constructs a CL_Texture bitmap font. | |
| CL_Font_System (CL_GraphicContext &context, const CL_StringRef &typeface_name, int height) | |
| Constructs a Font System. | |
| CL_Font_System (CL_GraphicContext &context, const CL_FontDescription &desc) | |
| Constructs a Font System. | |
| ~CL_Font_System () | |
Attributes | |
| CL_FontProvider_System * | get_provider () const |
| Retrieves the font provider. | |
| CL_Font_TextureGlyph * | get_glyph (CL_GraphicContext &gc, int glyph) |
| Get a glyph. Returns NULL if the glyph was not found. | |
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. | |
|
|
Constructs a CL_Texture bitmap font.
|
|
||||||||||||||||
|
Constructs a Font System.
|
|
||||||||||||
|
Constructs a Font System.
|
|
|
|
|
||||||||||||||||||||
|
Print text on gc. Multiline text (seperated by /n) is supported
|
|
||||||||||||||||||||||||
|
Print text on gc. Multiline text (seperated by /n) is supported
|
|
||||||||||||||||||||||||
|
Print text on gc. Multiline text (seperated by /n) is supported
|
|
|
Free the system font when it is no longer required.
|
|
||||||||||||||||
|
Get the character index at a specified point. Multiline text (seperated by /n) is supported
|
|
|
Retrieves font metrics description for the selected font.
|
|
||||||||||||
|
Get a glyph. Returns NULL if the glyph was not found.
|
|
|
Retrieves the font provider.
Reimplemented from CL_Font. |
|
||||||||||||
|
Calculate size of text string.
Multiline text (seperated by /n) is supported |
|
||||||||||||
|
Insert glyphs from a text string (using to system font). param: gc = The graphic context param: text = The text to use |
|
||||||||||||||||
|
Insert a glyph from a pixel buffer. param: gc = The graphic context param: position = The bitmap font position param: pixel_buffer = Pixel buffer containing the glyph. |
|
|
Is Null.
|
|
||||||||||||
|
Load a system font (for use by insert_glyph to load text from a system font).
|
|
||||||||||||
|
Registers a font for lookup when creating fonts.
|
|
|
Set the font metrics for the bitmap font. This is done automatically if the font is loaded from the system font.
|
|
|
Set the texture font to use a specified texture group.
|
1.4.6