Represents defining properties of a font used by FontDatabase to perform font merging.
More...
#include <font_properties.hpp>
Represents defining properties of a font used by FontDatabase to perform font merging.
Definition at line 37 of file font_properties.hpp.
◆ FontProperties() [1/2]
fastuidraw::FontProperties::FontProperties |
( |
void |
| ) |
|
Ctor. Initializes bold() as false, italic() as false and all string values as empty strings.
◆ FontProperties() [2/2]
fastuidraw::FontProperties::FontProperties |
( |
const FontProperties & |
obj | ) |
|
Copy ctor.
- Parameters
-
obj | vaue from which to copy |
◆ bold() [1/2]
bool fastuidraw::FontProperties::bold |
( |
void |
| ) |
const |
Specifies if the font is to be bold or not; this value is overridden by the value of style() if style() is a non-empty string.
◆ bold() [2/2]
Set if the font is to be bold or not.
- Parameters
-
◆ family() [1/2]
c_string fastuidraw::FontProperties::family |
( |
void |
| ) |
const |
Specifies the family name of the font, for example "Sans"
◆ family() [2/2]
◆ foundry() [1/2]
c_string fastuidraw::FontProperties::foundry |
( |
void |
| ) |
const |
Specifies the foundry name of the font, i.e. the maker of the font. Some systems (for example those using fontconfig) this value is ignored.
◆ foundry() [2/2]
◆ italic() [1/2]
bool fastuidraw::FontProperties::italic |
( |
void |
| ) |
const |
Specifies if the font is to be italic or not; this value is overridden by the value of style() if style() is a non-empty string.
◆ italic() [2/2]
Set if the font is to be italic or not.
- Parameters
-
◆ operator=()
assignment operator
- Parameters
-
obj | value from which to assign |
◆ source_label() [1/3]
c_string fastuidraw::FontProperties::source_label |
( |
void |
| ) |
const |
Specifies the source of the font, for those fonts coming from file names should be a string giving the filename and face index with a colon seperating them, for example "foo:0" indicates from file foo and the face index is 0.
◆ source_label() [2/3]
◆ source_label() [3/3]
Set the value returned by source_label(void) const to refer to a face index of a font file. Equivalent in function to
std::ostringstream str;
str << filename << ":" << face_index;
- Parameters
-
filename | name of file holding the font |
face_index | index of face within the file. |
◆ style() [1/2]
c_string fastuidraw::FontProperties::style |
( |
void |
| ) |
const |
Specifies the style name of the font. Examples are "Bold", "Bold Italic", "Book", "Condensed", "Condensed Bold Obliquie". The value for style is NOT orthogonal to the value of italic() and bold(). For example, under a standard GNU/Linux system the style names "Condensed Bold Oblique", "Condensed Oblique", "Condensed Bold" and "Condensed" give different fonts for the family name "DejaVu Serif". If style() is a non-empty string, the then it overrides both italic() and bold().
◆ style() [2/2]
◆ swap()
Swap operation
- Parameters
-
obj | object with which to swap |
The documentation for this class was generated from the following file: