Classes | |
class | clan::Font |
Font class. More... | |
class | clan::FontDescription |
Font description class. More... | |
class | clan::FontMetrics |
Font metrics class. More... | |
class | clan::VectorFont |
Vector font drawing class. More... | |
Construction | |
clan::Font::Font () | |
Constructs a font. More... | |
clan::Font::Font (Canvas &canvas, const std::string &typeface_name, int height) | |
Constructs standard font. More... | |
clan::Font::Font (Canvas &canvas, const FontDescription &desc) | |
clan::Font::Font (Canvas &canvas, const FontDescription &desc, const std::string &ttf_filename) | |
clan::Font::Font (Canvas &canvas, const FontDescription &desc, const std::string &ttf_filename, FileSystem fs) | |
clan::Font::Font (Canvas &canvas, Sprite &sprite, const std::string &glyph_list, int spacelen, bool monospace, const FontMetrics &metrics) | |
Constructs a Font based on a sprite. More... | |
Resources | |
static Resource< Font > | clan::Font::resource (Canvas &canvas, const FontDescription &desc, const ResourceManager &resources) |
Retrieves a Font resource from the resource manager. More... | |
Attributes | |
bool | clan::Font::is_null () const |
Is Null. More... | |
Operations | |
void | clan::Font::draw_text (Canvas &canvas, int x, int y, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::Font::draw_text (Canvas &canvas, float x, float y, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::Font::draw_text (Canvas &canvas, const Pointf &position, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::Font::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 | clan::Font::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 | clan::Font::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... | |
Size | clan::Font::get_text_size (Canvas &canvas, const std::string &text) |
Calculate size of text string. More... | |
Size | clan::Font::get_glyph_size (Canvas &canvas, unsigned int glyph) |
Gets the size of a specified glyph. More... | |
FontMetrics | clan::Font::get_font_metrics () |
Retrieves font metrics description for the selected font. More... | |
int | clan::Font::get_character_index (Canvas &canvas, const std::string &text, const Point &point) |
Get the character index at a specified point. More... | |
Construction | |
clan::FontDescription::FontDescription () | |
Constructs a font description with default values. More... | |
clan::FontDescription::FontDescription (const std::string &typeface_name) | |
Constructs a font description with default values. More... | |
virtual | clan::FontDescription::~FontDescription () |
static FontDescription | clan::FontDescription::create_null_object () |
Create null object. More... | |
Operations | |
FontDescription & | clan::FontDescription::operator= (const FontDescription ©) |
Copy assignment operator. More... | |
FontDescription | clan::FontDescription::clone () const |
void | clan::FontDescription::set_typeface_name (const std::string &name) |
Sets the typeface name. More... | |
void | clan::FontDescription::set_height (int value) |
Sets the font height. More... | |
void | clan::FontDescription::set_average_width (int value) |
Sets the font average width. More... | |
void | clan::FontDescription::set_escapement (float value) |
Sets the font escapement. More... | |
void | clan::FontDescription::set_orientation (float value) |
Sets the font orientation. More... | |
void | clan::FontDescription::set_weight (int value) |
Sets the font weight. More... | |
void | clan::FontDescription::set_italic (bool setting=true) |
Sets the font italic setting. More... | |
void | clan::FontDescription::set_underline (bool setting=true) |
Sets the font underline setting. More... | |
void | clan::FontDescription::set_strikeout (bool setting=true) |
Sets the font strikeout setting. More... | |
void | clan::FontDescription::set_fixed_pitch (bool setting=true) |
Sets the font fixed pitch setting. More... | |
void | clan::FontDescription::set_anti_alias (bool setting=true) |
Sets the font anti-alias setting (defaults to true) More... | |
void | clan::FontDescription::set_subpixel (bool setting=true) |
Sets the font subpixel rendering setting (defaults to true) More... | |
void | clan::FontDescription::set_charset (Charset new_charset) |
Sets the font charset (defaults to charset_default) More... | |
Construction | |
clan::FontMetrics::FontMetrics (float height=0.0f, float ascent=0.0f, float descent=0.0f, float internal_leading=0.0f, float external_leading=0.0f, float average_character_width=0.0f, float max_character_width=0.0f, float weight=0.0f, float overhang=0.0f, float digitized_aspect_x=0.0f, float digitized_aspect_y=0.0f, bool italic=false, bool underlined=false, bool struck_out=false, bool fixed_pitch=false) | |
clan::FontMetrics::~FontMetrics () | |
Attributes | |
float | clan::FontMetrics::get_height () const |
Returns the height of the font. More... | |
float | clan::FontMetrics::get_ascent () const |
Returns the font ascender. More... | |
float | clan::FontMetrics::get_descent () const |
Returns the font descender. More... | |
float | clan::FontMetrics::get_internal_leading () const |
Returns the amount of leading (space) inside the bounds set by the get_height() function. More... | |
float | clan::FontMetrics::get_external_leading () const |
Returns the amount of extra leading (space) that the application adds between rows. More... | |
float | clan::FontMetrics::get_average_character_width () const |
Returns the average width of characters in the font. More... | |
float | clan::FontMetrics::get_max_character_width () const |
Returns the width of the widest character in the font. More... | |
float | clan::FontMetrics::get_weight () const |
Returns the weight of the font. More... | |
float | clan::FontMetrics::get_overhang () const |
Returns the extra width per string that may be added to some synthesized fonts. More... | |
float | clan::FontMetrics::get_digitized_aspect_x () const |
Returns the horizontal aspect of the device for which the font was designed. More... | |
float | clan::FontMetrics::get_digitized_aspect_y () const |
Returns the vertical aspect of the device for which the font was designed. More... | |
std::string::value_type | clan::FontMetrics::get_first_char () const |
Returns the value of the first character defined in the font. More... | |
std::string::value_type | clan::FontMetrics::get_last_char () const |
Returns the value of the last character defined in the font. More... | |
std::string::value_type | clan::FontMetrics::get_default_char () const |
Returns the value of the character to be substituted for characters not in the font. More... | |
std::string::value_type | clan::FontMetrics::get_word_break_char () const |
Returns the value of the character that will be used to define word breaks for text justification. More... | |
bool | clan::FontMetrics::is_italic () const |
Returns true if the font is italic. More... | |
bool | clan::FontMetrics::is_underlined () const |
Returns true if the font is underlined. More... | |
bool | clan::FontMetrics::is_struck_out () const |
Returns true if the font is struck out. More... | |
bool | clan::FontMetrics::is_fixed_pitch () const |
Returns true if the font is a mono space font. More... | |
Operations | |
void | clan::FontMetrics::set_height (float value) |
Set the height of the font. More... | |
void | clan::FontMetrics::set_ascent (float value) |
Set the font ascender. More... | |
void | clan::FontMetrics::set_descent (float value) |
Set the font descender. More... | |
void | clan::FontMetrics::set_internal_leading (float value) |
Set the amount of leading (space) inside the bounds set by the set_height() function. More... | |
void | clan::FontMetrics::set_external_leading (float value) |
Set the amount of extra leading (space) that the application adds between rows. More... | |
void | clan::FontMetrics::set_average_character_width (float value) |
Set the average width of characters in the font. More... | |
void | clan::FontMetrics::set_max_character_width (float value) |
Set the width of the widest character in the font. More... | |
void | clan::FontMetrics::set_weight (float value) |
Set the weight of the font. More... | |
void | clan::FontMetrics::set_overhang (float value) |
Set the extra width per string that may be added to some synthesized fonts. More... | |
void | clan::FontMetrics::set_digitized_aspect_x (float value) |
Set the horizontal aspect of the device for which the font was designed. More... | |
void | clan::FontMetrics::set_digitized_aspect_y (float value) |
Set the vertical aspect of the device for which the font was designed. More... | |
void | clan::FontMetrics::set_italic (bool value) |
Set if the font is italic. More... | |
void | clan::FontMetrics::set_underlined (bool value) |
Set if the font is underlined. More... | |
void | clan::FontMetrics::set_struck_out (bool value) |
Set if the font is struck out. More... | |
void | clan::FontMetrics::set_fixed_pitch (bool value) |
Set if the font is a mono space font. More... | |
Construction | |
clan::VectorFont::VectorFont () | |
Constructs vector font. More... | |
clan::VectorFont::VectorFont (Canvas &canvas, const std::string &typeface_name, int height, const std::string &filename) | |
Constructs a Font Vector. More... | |
clan::VectorFont::VectorFont (Canvas &canvas, const FontDescription &desc, const std::string &filename) | |
Constructs a Font Vector. More... | |
clan::VectorFont::VectorFont (const Font &font) | |
Constructs a Font Vector from a Font, ensuring the correct type. More... | |
clan::VectorFont::~VectorFont () | |
Attributes | |
bool | clan::VectorFont::is_null () const |
Is Null. More... | |
Rectf | clan::VectorFont::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 > & | clan::VectorFont::get_glyph_filled (unsigned int glyph) |
const std::vector< std::vector < Vec2f > > & | clan::VectorFont::get_glyph_outline (unsigned int glyph) |
Size | clan::VectorFont::get_text_size (Canvas &canvas, const std::string &text) |
Calculate size of text string. More... | |
Size | clan::VectorFont::get_glyph_size (Canvas &canvas, unsigned int glyph) |
Gets the size of a specified glyph. More... | |
FontMetrics | clan::VectorFont::get_font_metrics () |
Retrieves font metrics description for the selected font. More... | |
Operations | |
void | clan::VectorFont::draw_text (Canvas &canvas, int x, int y, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::VectorFont::draw_text (Canvas &canvas, float x, float y, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::VectorFont::draw_text (Canvas &canvas, const Pointf &position, const std::string &text, const Colorf &color=Colorf::white) |
Print text on gc. More... | |
void | clan::VectorFont::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 | clan::VectorFont::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 | clan::VectorFont::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 | clan::VectorFont::set_filled (bool enable=true) |
Set to draw filled (default) More... | |
void | clan::VectorFont::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 | clan::VectorFont::set_texture (const Texture2D &src_texture, const Rectf &bounding_rect, const Rect &texture_rect) |
void | clan::VectorFont::reset_texture () |
Reset the texture. More... | |
Implementation | |
std::shared_ptr< VectorFont_Impl > | clan::VectorFont::impl |
clan::Font::Font | ( | ) |
Constructs a font.
clan::Font::Font | ( | Canvas & | canvas, |
const std::string & | typeface_name, | ||
int | height | ||
) |
Constructs standard font.
canvas | = Canvas |
clan::Font::Font | ( | Canvas & | canvas, |
const FontDescription & | desc | ||
) |
clan::Font::Font | ( | Canvas & | canvas, |
const FontDescription & | desc, | ||
const std::string & | ttf_filename | ||
) |
clan::Font::Font | ( | Canvas & | canvas, |
const FontDescription & | desc, | ||
const std::string & | ttf_filename, | ||
FileSystem | fs | ||
) |
clan::Font::Font | ( | Canvas & | canvas, |
Sprite & | sprite, | ||
const std::string & | glyph_list, | ||
int | spacelen, | ||
bool | monospace, | ||
const FontMetrics & | metrics | ||
) |
clan::FontDescription::FontDescription | ( | ) |
Constructs a font description with default values.
clan::FontDescription::FontDescription | ( | const std::string & | typeface_name | ) |
Constructs a font description with default values.
clan::FontMetrics::FontMetrics | ( | float | height = 0.0f , |
float | ascent = 0.0f , |
||
float | descent = 0.0f , |
||
float | internal_leading = 0.0f , |
||
float | external_leading = 0.0f , |
||
float | average_character_width = 0.0f , |
||
float | max_character_width = 0.0f , |
||
float | weight = 0.0f , |
||
float | overhang = 0.0f , |
||
float | digitized_aspect_x = 0.0f , |
||
float | digitized_aspect_y = 0.0f , |
||
bool | italic = false , |
||
bool | underlined = false , |
||
bool | struck_out = false , |
||
bool | fixed_pitch = false |
||
) |
clan::VectorFont::VectorFont | ( | ) |
Constructs vector font.
clan::VectorFont::VectorFont | ( | Canvas & | canvas, |
const std::string & | typeface_name, | ||
int | height, | ||
const std::string & | filename | ||
) |
clan::VectorFont::VectorFont | ( | Canvas & | canvas, |
const FontDescription & | desc, | ||
const std::string & | filename | ||
) |
|
explicit |
|
virtual |
clan::FontMetrics::~FontMetrics | ( | ) |
clan::VectorFont::~VectorFont | ( | ) |
FontDescription clan::FontDescription::clone | ( | ) | const |
|
static |
Create null object.
void clan::Font::draw_text | ( | Canvas & | canvas, |
int | x, | ||
int | y, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::draw_text | ( | Canvas & | canvas, |
int | x, | ||
int | y, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
void clan::Font::draw_text | ( | Canvas & | canvas, |
float | x, | ||
float | y, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::draw_text | ( | Canvas & | canvas, |
float | x, | ||
float | y, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
text | = The text to draw |
color | = The text color |
void clan::Font::draw_text | ( | Canvas & | canvas, |
const Pointf & | position, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
position | = Dest position |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::draw_text | ( | Canvas & | canvas, |
const Pointf & | position, | ||
const std::string & | text, | ||
const Colorf & | color = Colorf::white |
||
) |
Print text on gc.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
position | = Dest position |
text | = The text to draw |
color | = The text color |
void clan::Font::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
void clan::Font::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
x | = X position |
y | = Y position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
void clan::Font::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
position | = Dest position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
void clan::VectorFont::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.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
position | = Dest position |
content_box | = Rectangle the text is allowed within |
text | = The text to draw |
color | = The text color |
bool clan::FontDescription::get_anti_alias | ( | ) | const |
Get the font anti-alias setting (defaults to true)
float clan::FontMetrics::get_ascent | ( | ) | const |
Returns the font ascender.
float clan::FontMetrics::get_average_character_width | ( | ) | const |
Returns the average width of characters in the font.
The average width is generally defined as the width of the letter x. The value does not include the overhang required for bold or italic characters.
int clan::FontDescription::get_average_width | ( | ) | const |
Returns the font average width.
Rectf clan::VectorFont::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.
int clan::Font::get_character_index | ( | Canvas & | canvas, |
const std::string & | text, | ||
const Point & | point | ||
) |
Get the character index at a specified point.
Multiline text (seperated by /n) is supported
canvas | = Canvas |
text | = The string |
point | = The point |
Charset clan::FontDescription::get_charset | ( | ) | const |
Get the font charset
std::string::value_type clan::FontMetrics::get_default_char | ( | ) | const |
Returns the value of the character to be substituted for characters not in the font.
float clan::FontMetrics::get_descent | ( | ) | const |
Returns the font descender.
float clan::FontMetrics::get_digitized_aspect_x | ( | ) | const |
Returns the horizontal aspect of the device for which the font was designed.
float clan::FontMetrics::get_digitized_aspect_y | ( | ) | const |
Returns the vertical aspect of the device for which the font was designed.
float clan::FontDescription::get_escapement | ( | ) | const |
Returns the font escapement.
float clan::FontMetrics::get_external_leading | ( | ) | const |
Returns the amount of extra leading (space) that the application adds between rows.
std::string::value_type clan::FontMetrics::get_first_char | ( | ) | const |
Returns the value of the first character defined in the font.
bool clan::FontDescription::get_fixed_pitch | ( | ) | const |
Returns the font fixed pitch setting.
FontMetrics clan::VectorFont::get_font_metrics | ( | ) |
Retrieves font metrics description for the selected font.
FontMetrics clan::Font::get_font_metrics | ( | ) |
Retrieves font metrics description for the selected font.
const std::vector<Vec2f>& clan::VectorFont::get_glyph_filled | ( | unsigned int | glyph | ) |
const std::vector< std::vector<Vec2f> >& clan::VectorFont::get_glyph_outline | ( | unsigned int | glyph | ) |
Size clan::VectorFont::get_glyph_size | ( | Canvas & | canvas, |
unsigned int | glyph | ||
) |
Gets the size of a specified glyph.
The size is the increment value to the next glyph
glyph | = The glyph to get |
Size clan::Font::get_glyph_size | ( | Canvas & | canvas, |
unsigned int | glyph | ||
) |
Gets the size of a specified glyph.
The size is the increment value to the next glyph
glyph | = The glyph to get |
float clan::FontMetrics::get_height | ( | ) | const |
Returns the height of the font.
int clan::FontDescription::get_height | ( | ) | const |
Returns the font height.
float clan::FontMetrics::get_internal_leading | ( | ) | const |
Returns the amount of leading (space) inside the bounds set by the get_height() function.
bool clan::FontDescription::get_italic | ( | ) | const |
Returns the font italic setting.
std::string::value_type clan::FontMetrics::get_last_char | ( | ) | const |
Returns the value of the last character defined in the font.
float clan::FontMetrics::get_max_character_width | ( | ) | const |
Returns the width of the widest character in the font.
float clan::FontDescription::get_orientation | ( | ) | const |
Returns the font orientation.
float clan::FontMetrics::get_overhang | ( | ) | const |
Returns the extra width per string that may be added to some synthesized fonts.
bool clan::FontDescription::get_strikeout | ( | ) | const |
Returns the font strikeout setting.
bool clan::FontDescription::get_subpixel | ( | ) | const |
Get the font subpixel rendering setting (defaults to true)
Size clan::VectorFont::get_text_size | ( | Canvas & | canvas, |
const std::string & | text | ||
) |
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
Size clan::Font::get_text_size | ( | Canvas & | canvas, |
const std::string & | text | ||
) |
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
const std::string& clan::FontDescription::get_typeface_name | ( | ) | const |
Returns the typeface name.
bool clan::FontDescription::get_underline | ( | ) | const |
Returns the font underline setting.
std::string clan::FontDescription::get_unique_id | ( | ) | const |
Returns an unique string identifying this font description.
This is useful for placing font descriptions in a map.
float clan::FontMetrics::get_weight | ( | ) | const |
Returns the weight of the font.
int clan::FontDescription::get_weight | ( | ) | const |
Returns the font weight.
std::string::value_type clan::FontMetrics::get_word_break_char | ( | ) | const |
Returns the value of the character that will be used to define word breaks for text justification.
bool clan::FontMetrics::is_fixed_pitch | ( | ) | const |
Returns true if the font is a mono space font.
bool clan::FontMetrics::is_italic | ( | ) | const |
Returns true if the font is italic.
bool clan::VectorFont::is_null | ( | ) | const |
Is Null.
|
inline |
Returns true if this object is invalid.
bool clan::Font::is_null | ( | ) | const |
Is Null.
bool clan::FontMetrics::is_struck_out | ( | ) | const |
Returns true if the font is struck out.
bool clan::FontMetrics::is_underlined | ( | ) | const |
Returns true if the font is underlined.
FontDescription& clan::FontDescription::operator= | ( | const FontDescription & | copy | ) |
Copy assignment operator.
bool clan::FontDescription::operator== | ( | const FontDescription & | other | ) | const |
Returns true if the font is identical.
void clan::VectorFont::reset_texture | ( | ) |
Reset the texture.
|
static |
void clan::FontDescription::set_anti_alias | ( | bool | setting = true | ) |
Sets the font anti-alias setting (defaults to true)
void clan::FontMetrics::set_ascent | ( | float | value | ) |
Set the font ascender.
value | = The ascent |
void clan::FontMetrics::set_average_character_width | ( | float | value | ) |
Set the average width of characters in the font.
value | = The average_character_width |
void clan::FontDescription::set_average_width | ( | int | value | ) |
Sets the font average width.
void clan::FontDescription::set_charset | ( | Charset | new_charset | ) |
Sets the font charset (defaults to charset_default)
new_charset | = The charset. charset_default = Use operating systems default |
void clan::FontMetrics::set_descent | ( | float | value | ) |
Set the font descender.
value | = The descent |
void clan::FontMetrics::set_digitized_aspect_x | ( | float | value | ) |
Set the horizontal aspect of the device for which the font was designed.
value | = The digitized_aspect_x |
void clan::FontMetrics::set_digitized_aspect_y | ( | float | value | ) |
Set the vertical aspect of the device for which the font was designed.
value | = The digitized_aspect_y |
void clan::FontDescription::set_escapement | ( | float | value | ) |
Sets the font escapement.
void clan::FontMetrics::set_external_leading | ( | float | value | ) |
Set the amount of extra leading (space) that the application adds between rows.
value | = The external_leading |
void clan::VectorFont::set_filled | ( | bool | enable = true | ) |
Set to draw filled (default)
void clan::FontDescription::set_fixed_pitch | ( | bool | setting = true | ) |
Sets the font fixed pitch setting.
void clan::FontMetrics::set_fixed_pitch | ( | bool | value | ) |
Set if the font is a mono space font.
value | = true if fixed_pitch |
void clan::FontMetrics::set_height | ( | float | value | ) |
Set the height of the font.
value | = The height |
void clan::FontDescription::set_height | ( | int | value | ) |
Sets the font height.
void clan::FontMetrics::set_internal_leading | ( | float | value | ) |
Set the amount of leading (space) inside the bounds set by the set_height() function.
value | = The internal_leading |
void clan::FontDescription::set_italic | ( | bool | setting = true | ) |
Sets the font italic setting.
void clan::FontMetrics::set_italic | ( | bool | value | ) |
Set if the font is italic.
value | = true if italic |
void clan::FontMetrics::set_max_character_width | ( | float | value | ) |
Set the width of the widest character in the font.
value | = The max_character_width |
void clan::FontDescription::set_orientation | ( | float | value | ) |
Sets the font orientation.
void clan::FontMetrics::set_overhang | ( | float | value | ) |
Set the extra width per string that may be added to some synthesized fonts.
value | = The overhang |
void clan::FontDescription::set_strikeout | ( | bool | setting = true | ) |
Sets the font strikeout setting.
void clan::FontMetrics::set_struck_out | ( | bool | value | ) |
Set if the font is struck out.
value | = true if struck_out |
void clan::FontDescription::set_subpixel | ( | bool | setting = true | ) |
Sets the font subpixel rendering setting (defaults to true)
void clan::VectorFont::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.
src_texture | = The texture to use. |
bounding_rect | = The bounding rect of the glyph. Use get_bounding_box() to calculate this |
texture_rect | = The texture rect |
void clan::VectorFont::set_texture | ( | const Texture2D & | src_texture, |
const Rectf & | bounding_rect, | ||
const Rect & | texture_rect | ||
) |
void clan::FontDescription::set_typeface_name | ( | const std::string & | name | ) |
Sets the typeface name.
void clan::FontDescription::set_underline | ( | bool | setting = true | ) |
Sets the font underline setting.
void clan::FontMetrics::set_underlined | ( | bool | value | ) |
Set if the font is underlined.
value | = true if underlined |
void clan::FontDescription::set_weight | ( | int | value | ) |
Sets the font weight.
void clan::FontMetrics::set_weight | ( | float | value | ) |
Set the weight of the font.
value | = The weight |
void clan::FontDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
std::shared_ptr<VectorFont_Impl> clan::VectorFont::impl |