xtd 0.2.0
font_family.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../drawing_export.hpp"
6#include "font_style.hpp"
8#include <xtd/iequatable>
9#include <xtd/object>
10#include <xtd/string>
11
13namespace xtd {
15 namespace drawing {
17 namespace text {
18 class font_collection;
19 }
21
33 class drawing_export_ font_family final : public xtd::object, public xtd::iequatable<font_family> {
34 struct data;
35
36 public:
38
43 explicit font_family(const xtd::string& name);
44
47 explicit font_family(text::generic_font_families generic_font_families);
48
53 font_family(const xtd::string& name, const text::font_collection& font_collection);
55
58 font_family(const font_family& value);
60 font_family& operator =(const font_family& value);
62
64
68 const xtd::string& name() const noexcept;
70
72
76 static xtd::array<font_family> families() noexcept;
77
80 static font_family generic_monospace() noexcept;
81
84 static font_family generic_sans_serif() noexcept;
85
88 static font_family generic_serif() noexcept;
90
92
97 bool equals(const xtd::object& obj) const noexcept override;
101 bool equals(const font_family& other) const noexcept override;
102
106 int32 get_cell_ascent(font_style style) const;
107
111 int32 get_cell_descent(font_style style) const;
112
116 int32 get_em_height(font_style style) const noexcept;
117
120 xtd::size get_hash_code() const noexcept override;
121
125 int32 get_line_spacing(font_style style) const;
126
131 xtd::string get_name(int32 language) const;
132
136 bool is_style_available(font_style style) const;
137
140 xtd::string to_string() const noexcept override;
142
143 private:
144 xtd::sptr<data> data_;
145 };
146 }
147}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
Represents text as a sequence of character units.
Definition basic_string.hpp:71
Defines a group of type faces having a similar basic design and certain variations in styles....
Definition font_family.hpp:33
const xtd::string & name() const noexcept
Gets the name of this font_family.
font_family(const xtd::string &name, const text::font_collection &font_collection)
Initializes a new xtd::drawing::font_family in the specified font_collection with the specified name.
font_family(text::generic_font_families generic_font_families)
Initializes a new xtd::drawing::font_family from the specified generic font family.
font_family(const xtd::string &name)
Initializes a new xtd::drawing::font_family with the specified name.
Provides a base class for installed and private font collections.
Definition font_collection.hpp:22
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
The xtd::shared_ptr_object is a shared pointer as std::shared_ptr.
Definition shared_ptr_object.hpp:30
Contains xtd::drawing::font_style enum class.
Contains xtd::drawing::text::generic_font_families enum class.
font_style
Specifies style information applied to text. This enumeration has a flags attribute that allows a bit...
Definition font_style.hpp:17
generic_font_families
Specifies a generic font_family object.
Definition generic_font_families.hpp:19
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:31