zenilib
0.5.3.0
|
#include <Font.h>
Inherits Zeni::Font.
Public Member Functions | |
Font_FT () | |
Instantiate a new Font with a call to get_Video().create_Font() More... | |
Font_FT (const String &filepath, const float &glyph_height, const float &virtual_screen_height) | |
Instantiate a new Font with a call to get_Video().create_Font() More... | |
virtual float | get_text_width (const String &text) const |
Get the width of text rendering using this font. Approximately text_height * text.length() / 2.0f. More... | |
virtual void | render_text (const String &text, const Point2f &position, const Color &color, const JUSTIFY &justify=ZENI_LEFT) const |
Render text at screen position (x, y), with justification JUSTIFY. More... | |
virtual void | render_text (const String &text, const Point3f &position, const Vector3f &right, const Vector3f &down, const Color &color, const JUSTIFY &justify=ZENI_DEFAULT_JUSTIFY) const |
Render text with greater control over position and orientation, with justification JUSTIFY. More... | |
Public Member Functions inherited from Zeni::Font | |
Font () | |
Instantiate a new Font with a call to get_Video().create_Font() More... | |
Font (const float &glyph_height, const float &virtual_screen_height, const String &font_name="Untitled Font") | |
Instantiate a new Font with a call to get_Video().create_Font() More... | |
virtual | ~Font () |
const String & | get_name () const |
Get the name of the font. More... | |
float | get_text_height () const |
Get the height of the font. The width is usually half the height, by default. More... | |
float | get_virtual_screen_height () const |
Get the intended virtual screen height for the rendering of this Font. More... | |
Zeni::Font_FT::Font_FT | ( | ) |
Instantiate a new Font with a call to get_Video().create_Font()
Zeni::Font_FT::Font_FT | ( | const String & | filepath, |
const float & | glyph_height, | ||
const float & | virtual_screen_height | ||
) |
Instantiate a new Font with a call to get_Video().create_Font()
Definition at line 131 of file Font.cpp.
References Zeni::ftoa(), and ZENI_LOGD().
Get the width of text rendering using this font. Approximately text_height * text.length() / 2.0f.
Implements Zeni::Font.
Definition at line 151 of file Font.cpp.
References int, max, and Zeni::String::size().
|
virtual |
Render text at screen position (x, y), with justification JUSTIFY.
Implements Zeni::Font.
Definition at line 167 of file Font.cpp.
References Zeni::Video::apply_Texture(), Zeni::Video::get_Color(), Zeni::get_Video(), i, int, j, Zeni::Video::set_Color(), Zeni::String::size(), u, Zeni::Video::unapply_Texture(), Zeni::Point2f::x, Zeni::Point2f::y, Zeni::ZENI_CENTER, Zeni::ZENI_LEFT, and Zeni::ZENI_RIGHT.
|
virtual |
Render text with greater control over position and orientation, with justification JUSTIFY.
Implements Zeni::Font.
Definition at line 219 of file Font.cpp.
References Zeni::Video::apply_Texture(), Zeni::Video::get_Color(), Zeni::get_Video(), i, int, j, Zeni::Video::set_Color(), Zeni::String::size(), u, Zeni::Video::unapply_Texture(), Zeni::ZENI_CENTER, Zeni::ZENI_LEFT, and Zeni::ZENI_RIGHT.