Vector font drawing class. More...
#include <vector_font.h>
Public Member Functions | |
Construction | |
| VectorFont () | |
| Constructs vector font. More... | |
| VectorFont (Canvas &canvas, const std::string &typeface_name, int height, const std::string &filename) | |
| Constructs a Font Vector. More... | |
| VectorFont (Canvas &canvas, const FontDescription &desc, const std::string &filename) | |
| Constructs a Font Vector. More... | |
| VectorFont (const Font &font) | |
| Constructs a Font Vector from a Font, ensuring the correct type. More... | |
| ~VectorFont () | |
Attributes | |
| bool | is_null () const |
| Is Null. More... | |
| Rectf | get_bounding_box (const std::string &reference_string) const |
| Get the largest bounding box for each glyph for this font in a given reference string. More... | |
| const std::vector< Vec2f > & | get_glyph_filled (unsigned int glyph) |
| const std::vector< std::vector < Vec2f > > & | get_glyph_outline (unsigned int glyph) |
| Size | get_text_size (Canvas &canvas, const std::string &text) |
| Calculate size of text string. More... | |
| Size | get_glyph_size (Canvas &canvas, unsigned int glyph) |
| Gets the size of a specified glyph. More... | |
| FontMetrics | get_font_metrics () |
| Retrieves font metrics description for the selected font. More... | |
Operations | |
| void | draw_text (Canvas &canvas, int x, int y, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc. More... | |
| void | draw_text (Canvas &canvas, float x, float y, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc. More... | |
| void | draw_text (Canvas &canvas, const Pointf &position, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc. More... | |
| void | draw_text_ellipsis (Canvas &canvas, int x, int y, Rect content_box, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc adding ellipses if it does not fit. More... | |
| void | draw_text_ellipsis (Canvas &canvas, float x, float y, Rectf content_box, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc adding ellipses if it does not fit. More... | |
| void | draw_text_ellipsis (Canvas &canvas, const Pointf &position, Rectf content_box, const std::string &text, const Colorf &color=Colorf::white) |
| Print text on gc adding ellipses if it does not fit. More... | |
| void | set_filled (bool enable=true) |
| Set to draw filled (default) More... | |
| void | set_texture (const Texture2D &src_texture, const Rectf &bounding_rect, const Rectf &texture_rect=Rectf(0.0f, 0.0f, 1.0f, 1.0f)) |
| Set the texture. More... | |
| void | set_texture (const Texture2D &src_texture, const Rectf &bounding_rect, const Rect &texture_rect) |
| void | reset_texture () |
| Reset the texture. More... | |
Public Attributes | |
Implementation | |
| std::shared_ptr< VectorFont_Impl > | impl |
Vector font drawing class.