12#include "../drawing_export.h" 
   77      font(
const drawing::font_family& 
font_family, 
float em_size, 
font_style style, 
graphics_unit unit, uint8_t gdi_char_set, 
bool gdi_vertical_font) : 
font(
font_family.name(), em_size, style, unit, gdi_char_set, gdi_vertical_font) {}
 
  158      bool operator==(
const font& value)
 const {
return data_->font_family_ == value.data_->font_family_ && data_->gdi_char_set_ == value.data_->gdi_char_set_ && data_->gdi_vertical_font_ == value.data_->gdi_vertical_font_ && data_->style_ == value.data_->style_ && data_->size_ == value.data_->size_ && data_->unit_ == value.data_->unit_;}
 
  159      bool operator!=(
const font& value)
 const {
return !operator==(value);}
 
  167        return ustring::format(
"[{}: name={}, size={}, units={}, gdi_char_set={}, gdi_vertical_font={}]", ustring::class_name(*
this), data_->font_family_.name(), data_->size_, (int32_t)data_->unit_, data_->gdi_char_set_, data_->gdi_vertical_font_);
 
  176      bool bold()
 const {
return (data_->style_ & font_style::bold) == font_style::bold;}
 
  218      intptr_t 
handle()
 const {
return data_->handle_;}
 
  235      bool italic()
 const {
return (data_->style_ & font_style::italic) == font_style::italic;}
 
  247      float size()
 const {
return data_->size_;}
 
  255      bool strikeout()
 const {
return (data_->style_ & font_style::strikeout) == font_style::strikeout;}
 
  263      bool underline()
 const {
return (data_->style_ & font_style::underline) == font_style::underline;}
 
  306      friend class xtd::forms::native::font_dialog;
 
  308      font(intptr_t hfont);
 
  310        intptr_t handle_ = 0;
 
  312        uint8_t gdi_char_set_ = 1;
 
  313        bool gdi_vertical_font_ = 
false;
 
  314        bool is_system_font_ = 
false;
 
  321      std::shared_ptr<data> data_ = std::make_shared<data>();
 
Defines a group of type faces having a similar basic design and certain variations in styles....
Definition: font_family.h:32
 
Defines a particular format for text, including font face, size, and style attributes....
Definition: font.h:39
 
font(const font &prototype, float em_size)
IInitializes a new Font that uses the specified existing xtd::drawing::font and size.
 
font(const drawing::font_family &font_family, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set)
Initializes a new xtd::drawing::font using the specified size, style, unit, and character set.
Definition: font.h:97
 
int32_t height() const
Gets the line spacing of this font.
 
font(const drawing::font_family &font_family, float em_size, font_style style, graphics_unit unit)
Initializes a new xtd::drawing::font using the specified size, style and unit.
Definition: font.h:113
 
float get_height(const graphics &graphics) const
Returns the line spacing, in the current unit of a specified xtd::drawing::graphics,...
 
uint8_t gdi_char_set() const
Gets a byte value that specifies the GDI character set that this xtd::drawing::font uses.
Definition: font.h:208
 
intptr_t handle() const
Gets the window handle that the font is bound to.
Definition: font.h:218
 
font(const drawing::font_family &font_family, float em_size, graphics_unit unit)
Initializes a new xtd::drawing::font using the specified size and unit.
Definition: font.h:141
 
xtd::ustring to_string() const noexcept override
Converts this font_family to a human-readable string representation.
Definition: font.h:165
 
bool gdi_vertical_font() const
Gets a Boolean value that indicates whether this xtd::drawing::font is derived from a GDI vertical fo...
Definition: font.h:214
 
font(const drawing::font_family &font_family, float em_size, font_style style)
Initializes a new xtd::drawing::font using the specified size and style.
Definition: font.h:127
 
font(const font &prototype, float em_size, font_style style)
IInitializes a new Font that uses the specified existing xtd::drawing::font, size and font_style enum...
 
bool underline() const
Gets a value that indicates whether this xtd::drawing::font is underline.
Definition: font.h:263
 
const xtd::ustring & original_font_name() const
Gets the face name of this Font.
Definition: font.h:243
 
float size_in_points() const
 
font(const drawing::font_family &font_family, float em_size)
Initializes a new xtd::drawing::font using the specified size.
Definition: font.h:153
 
intptr_t to_hfont() const
 
bool bold() const
Gets a value that indicates whether this xtd::drawing::font is bold.
Definition: font.h:176
 
font(const font &prototype, font_style style)
IInitializes a new Font that uses the specified existing xtd::drawing::font and font_style enumeratio...
 
font(xtd::ustring family_name, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set, bool gdi_vertical_font)
IInitializes a new xtd::drawing::font using the specified size, style, unit, and character set.
 
float size() const
Gets the em-size of this xtd::drawing::font measured in the units specified by the unit property.
Definition: font.h:247
 
const xtd::ustring & name() const
Gets the face name of this xtd::drawing::font.
Definition: font.h:239
 
graphics_unit unit() const
Gets the unit of measure for this xtd::drawing::font.
Definition: font.h:267
 
font(xtd::ustring family_name, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set)
Initializes a new xtd::drawing::font using the specified size, style, unit, and character set.
Definition: font.h:87
 
float get_height(float dpi) const
Returns the height, in pixels, of this Font when drawn to a device with the specified vertical resolu...
 
font(xtd::ustring family_name, float em_size, font_style style)
Initializes a new xtd::drawing::font using the specified size and style.
Definition: font.h:120
 
static font from_hdc(const intptr_t hdc)
Creates a font from the specified Windows handle to a device context.
 
font_style style() const
Gets style information for this xtd::drawing::font.
Definition: font.h:259
 
bool italic() const
Gets a value that indicates whether this xtd::drawing::font is italic.
Definition: font.h:235
 
bool strikeout() const
Gets a value that indicates whether this xtd::drawing::font is strikeout.
Definition: font.h:255
 
font(xtd::ustring family_name, float em_size, graphics_unit unit)
Initializes a new xtd::drawing::font using the specified size and unit.
Definition: font.h:134
 
font(xtd::ustring family_name, float em_size)
Initializes a new xtd::drawing::font using the specified size and unit.
Definition: font.h:147
 
bool is_system_font() const
Gets a value indicating whether the font is a member of xtd::drawing::system_fonts.
Definition: font.h:231
 
drawing::font_family font_family() const
Gets the xtd::drawing::font_family associated with this xtd::drawing::font.
Definition: font.h:181
 
font(const drawing::font_family &font_family, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set, bool gdi_vertical_font)
Initializes a new xtd::drawing::font using the specified size, style, unit, and character set.
Definition: font.h:77
 
font(xtd::ustring family_name, float em_size, font_style style, graphics_unit unit)
Initializes a new xtd::drawing::font using the specified size, style and unit.
Definition: font.h:105
 
float get_height() const
Returns the line spacing, in pixels, of this font.
 
static font from_hfont(const intptr_t hfont)
Creates a font from the specified Windows handle.
 
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:48
 
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:48
 
Specifies the fonts used to display text in Windows display elements.
Definition: system_fonts.h:20
 
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
 
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
 
Contains xtd::drawing::font_family class.
 
Contains xtd::drawing::graphics_unit enum class.
 
#define drawing_export_
Define shared library export.
Definition: drawing_export.h:13
 
graphics_unit
Specifies the unit of measure for the given data. This enumeration has a flags attribute that allows ...
Definition: graphics_unit.h:17
 
font_style
Specifies style information applied to text. This enumeration has a flags attribute that allows a bit...
Definition: font_style.h:17
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
 
Contains xtd::object class.
 
Contains xtd::ustring class.