Font description class. More...
#include <font_description.h>
Public Member Functions | |
| FontDescription () | |
| Constructs a font description with default values. More... | |
| virtual | ~FontDescription () |
| bool | anti_alias () const |
| Get the font anti-alias setting (defaults to true) More... | |
| float | average_width () const |
| Returns the font average width. More... | |
| Charset | charset () const |
| Get the font charset More... | |
| FontDescription | clone () const |
| float | escapement () const |
| Returns the font escapement. More... | |
| float | height () const |
| Returns the font height. More... | |
| bool | is_null () const |
| Returns true if this object is invalid. More... | |
| float | line_height () const |
| Returns the distance between each line. More... | |
| FontDescription & | operator= (const FontDescription ©) |
| Copy assignment operator (does not copy the description, use clone() if you want that) More... | |
| bool | operator== (const FontDescription &other) const |
| Returns true if the font is identical Line_height is excluded. More... | |
| float | orientation () const |
| Returns the font orientation. More... | |
| void | set_anti_alias (bool setting=true) |
| Sets the font anti-alias setting (defaults to true) More... | |
| void | set_average_width (float value=0.0f) |
| Sets the font average width. More... | |
| void | set_charset (Charset new_charset) |
| Sets the font charset (defaults to charset_default) More... | |
| void | set_escapement (float value) |
| Sets the font escapement. More... | |
| void | set_height (float value=20.0f) |
| Sets the font height. More... | |
| void | set_line_height (float height) |
| Sets the distance between each line. More... | |
| void | set_orientation (float value) |
| Sets the font orientation. More... | |
| void | set_style (FontStyle setting=FontStyle::normal) |
| Sets the font style. More... | |
| void | set_subpixel (bool setting=true) |
| Sets the font subpixel rendering setting (defaults to true) More... | |
| void | set_weight (FontWeight value=FontWeight::normal) |
| Sets the font weight. More... | |
| FontStyle | style () const |
| Returns the font style. More... | |
| bool | subpixel () const |
| Get the font subpixel rendering setting (defaults to true) More... | |
| void | throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
| std::string | unique_id () const |
| Returns an unique string identifying this font description. More... | |
| FontWeight | weight () const |
| Returns the font weight. More... | |
Static Public Member Functions | |
| static FontDescription | create_null_object () |
| Create null object. More... | |
Font description class.
This class allows you to setup a more advanced description when creating a font.
| uicore::FontDescription::FontDescription | ( | ) |
Constructs a font description with default values.
|
virtual |
| bool uicore::FontDescription::anti_alias | ( | ) | const |
Get the font anti-alias setting (defaults to true)
| float uicore::FontDescription::average_width | ( | ) | const |
Returns the font average width.
0.0f = Use default
| Charset uicore::FontDescription::charset | ( | ) | const |
Get the font charset
| FontDescription uicore::FontDescription::clone | ( | ) | const |
|
static |
Create null object.
| float uicore::FontDescription::escapement | ( | ) | const |
Returns the font escapement.
| float uicore::FontDescription::height | ( | ) | const |
Returns the font height.
|
inline |
Returns true if this object is invalid.
| float uicore::FontDescription::line_height | ( | ) | const |
Returns the distance between each line.
| FontDescription& uicore::FontDescription::operator= | ( | const FontDescription & | copy | ) |
Copy assignment operator (does not copy the description, use clone() if you want that)
| bool uicore::FontDescription::operator== | ( | const FontDescription & | other | ) | const |
Returns true if the font is identical Line_height is excluded.
| float uicore::FontDescription::orientation | ( | ) | const |
Returns the font orientation.
| void uicore::FontDescription::set_anti_alias | ( | bool | setting = true | ) |
Sets the font anti-alias setting (defaults to true)
| void uicore::FontDescription::set_average_width | ( | float | value = 0.0f | ) |
Sets the font average width.
0.0f = Use default
| void uicore::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 uicore::FontDescription::set_escapement | ( | float | value | ) |
Sets the font escapement.
| void uicore::FontDescription::set_height | ( | float | value = 20.0f | ) |
Sets the font height.
| void uicore::FontDescription::set_line_height | ( | float | height | ) |
Sets the distance between each line.
| void uicore::FontDescription::set_orientation | ( | float | value | ) |
Sets the font orientation.
| void uicore::FontDescription::set_style | ( | FontStyle | setting = FontStyle::normal | ) |
Sets the font style.
| void uicore::FontDescription::set_subpixel | ( | bool | setting = true | ) |
Sets the font subpixel rendering setting (defaults to true)
| void uicore::FontDescription::set_weight | ( | FontWeight | value = FontWeight::normal | ) |
Sets the font weight.
| FontStyle uicore::FontDescription::style | ( | ) | const |
Returns the font style.
| bool uicore::FontDescription::subpixel | ( | ) | const |
Get the font subpixel rendering setting (defaults to true)
| void uicore::FontDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| std::string uicore::FontDescription::unique_id | ( | ) | const |
Returns an unique string identifying this font description.
This is useful for placing font descriptions in a map. Line_height is excluded.
| FontWeight uicore::FontDescription::weight | ( | ) | const |
Returns the font weight.