xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <font_family.h>
Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.
Inherits xtd::object.
Public Member Functions | |
font_family (const xtd::ustring &name) | |
Initializes a new xtd::drawing::font_family with the specified name. More... | |
font_family (const xtd::ustring &name, const text::font_collection &font_collection) | |
Initializes a new xtd::drawing::font_family in the specified font_collection with the specified name. More... | |
font_family (text::generic_font_families generic_font_families) | |
Initializes a new xtd::drawing::font_family from the specified generic font family. More... | |
int32_t | get_cell_ascent (font_style style) const |
Returns the cell ascent, in design units, of the font_family of the specified style. More... | |
int32_t | get_cell_descent (font_style style) const |
Returns the cell descent, in design units, of the font_family of the specified style. More... | |
int32_t | get_em_height (font_style style) const |
Gets the height, in font design units, of the em square for the specified style. More... | |
int32_t | get_line_spacing (font_style style) const |
Returns the line spacing, in design units, of the font_family of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text. More... | |
xtd::ustring | get_name (int32_t language) const |
Returns the name, in the specified language, of this font_family. More... | |
bool | is_style_available (font_style style) const |
Indicates whether the specified font_style enumeration is available. More... | |
const xtd::ustring & | name () const |
Gets the name of this font_family. More... | |
xtd::ustring | to_string () const noexcept override |
Converts this font_family to a human-readable string representation. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
Static Public Member Functions | |
static std::vector< font_family > | families () |
Returns an array that contains all the font_family objects associated with the current graphics context. More... | |
static font_family | generic_monospace () |
Gets a generic monospace font_family. More... | |
static font_family | generic_sans_serif () |
Gets a generic sans serif font_family. More... | |
static font_family | generic_serif () |
Gets a generic serif font_family. More... | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
xtd::drawing::font_family::font_family | ( | const xtd::ustring & | name | ) |
Initializes a new xtd::drawing::font_family with the specified name.
name | The name of the new xtd::drawing::font_family. |
std::invalid_argument | name is an empty string ("") - or - name specifies a font that is not installed on the computer running the application. |
xtd::drawing::font_family::font_family | ( | text::generic_font_families | generic_font_families | ) |
Initializes a new xtd::drawing::font_family from the specified generic font family.
generic_font_families | The xtd::drawing::text::generic_font_families from which to create the new font_family. |
xtd::drawing::font_family::font_family | ( | const xtd::ustring & | name, |
const text::font_collection & | font_collection | ||
) |
Initializes a new xtd::drawing::font_family in the specified font_collection with the specified name.
name | The name of the new xtd::drawing::font_family. |
font_collection | The FontCollection that contains this FontFamily. |
std::invalid_argument | name is an empty string ("") - or - name specifies a font that is not installed on the computer running the application - or - name specifies a font that is not a part of specified font_collection.. |
|
static |
Returns an array that contains all the font_family objects associated with the current graphics context.
|
inlinestatic |
Gets a generic monospace font_family.
|
inlinestatic |
Gets a generic sans serif font_family.
|
inlinestatic |
Gets a generic serif font_family.
int32_t xtd::drawing::font_family::get_cell_ascent | ( | font_style | style | ) | const |
Returns the cell ascent, in design units, of the font_family of the specified style.
style | A font_style that contains style information for the font. |
int32_t xtd::drawing::font_family::get_cell_descent | ( | font_style | style | ) | const |
Returns the cell descent, in design units, of the font_family of the specified style.
style | A font_style that contains style information for the font. |
int32_t xtd::drawing::font_family::get_em_height | ( | font_style | style | ) | const |
Gets the height, in font design units, of the em square for the specified style.
style | A font_style that contains style information for the font. |
int32_t xtd::drawing::font_family::get_line_spacing | ( | font_style | style | ) | const |
Returns the line spacing, in design units, of the font_family of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text.
style | A font_style that contains style information for the font. |
xtd::ustring xtd::drawing::font_family::get_name | ( | int32_t | language | ) | const |
Returns the name, in the specified language, of this font_family.
language | The language in which the name is returned. |
bool xtd::drawing::font_family::is_style_available | ( | font_style | style | ) | const |
Indicates whether the specified font_style enumeration is available.
style | The font_style to test. |
|
inline |
Gets the name of this font_family.
|
inlineoverridevirtualnoexcept |
Converts this font_family to a human-readable string representation.
Reimplemented from xtd::object.