xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::drawing::font Class Referencefinal

Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited. More...

#include <font.h>

Public Member Functions

 font (const font &prototype, float em_size)
 Initializes a new Font that uses the specified existing xtd::drawing::font and size. More...
 
 font (const font &prototype, float em_size, font_style style)
 Initializes a new Font that uses the specified existing xtd::drawing::font, size and font_style enumeration. More...
 
 font (const font &prototype, font_style style)
 Initializes a new Font that uses the specified existing xtd::drawing::font and font_style enumeration. More...
 
 font (std::string family_name, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set, bool gdi_vertical_font)
 nitializes a new xtd::drawing::font using the specified size, style, unit, and character set. More...
 
 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)
 nitializes a new xtd::drawing::font using the specified size, style, unit, and character set. More...
 
 font (std::string family_name, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set)
 nitializes a new xtd::drawing::font using the specified size, style, unit, and character set. More...
 
 font (const drawing::font_family &font_family, float em_size, font_style style, graphics_unit unit, uint8_t gdi_char_set)
 nitializes a new xtd::drawing::font using the specified size, style, unit, and character set. More...
 
 font (std::string family_name, float em_size, font_style style, graphics_unit unit)
 nitializes a new xtd::drawing::font using the specified size, style and unit. More...
 
 font (const drawing::font_family &font_family, float em_size, font_style style, graphics_unit unit)
 nitializes a new xtd::drawing::font using the specified size, style and unit. More...
 
 font (std::string family_name, float em_size, font_style style)
 nitializes a new xtd::drawing::font using the specified size and style. More...
 
 font (const drawing::font_family &font_family, float em_size, font_style style)
 nitializes a new xtd::drawing::font using the specified size and style. More...
 
 font (std::string family_name, float em_size, graphics_unit unit)
 nitializes a new xtd::drawing::font using the specified size and unit. More...
 
 font (const drawing::font_family &font_family, float em_size, graphics_unit unit)
 nitializes a new xtd::drawing::font using the specified size and unit. More...
 
 font (std::string family_name, float em_size)
 nitializes a new xtd::drawing::font using the specified size and unit. More...
 
 font (const drawing::font_family &font_family, float em_size)
 nitializes a new xtd::drawing::font using the specified size. More...
 
bool bold () const
 Gets a value that indicates whether this xtd::drawing::font is bold. More...
 
drawing::font_family font_family () const
 Gets the xtd::draing::font_family associated with this xtd::drawing::font. More...
 
uint8_t gdi_char_set () const
 Gets a byte value that specifies the GDI character set that this xtd::drawing::font uses. More...
 
bool gdi_vertical_font () const
 Gets a Boolean value that indicates whether this xtd::drawing::font is derived from a GDI vertical font. More...
 
float get_height () const
 Returns the line spacing, in pixels, of this font. More...
 
float get_height (const graphics &graphics) const
 Returns the line spacing, in the current unit of a specified xtd::drawing::raphics, of this font. More...
 
float get_height (float dpi) const
 Returns the height, in pixels, of this Font when drawn to a device with the specified vertical resolution. More...
 
intptr_t handle () const
 Gets the window handle that the font is bound to. More...
 
int32_t height () const
 Gets the line spacing of this font. More...
 
bool is_system_font () const
 Gets a value indicating whether the font is a member of xtd::drawing::system_fonts. More...
 
bool italic () const
 Gets a value that indicates whether this xtd::drawing::font is italic. More...
 
const std::string & name () const
 Gets the face name of this xtd::drawing::font. More...
 
const std::string & original_font_name () const
 Gets the face name of this Font. More...
 
float size () const
 Gets the em-size of this xtd::drawing::font measured in the units specified by the unit property. More...
 
float size_in_points () const
 
bool strikeout () const
 Gets a value that indicates whether this xtd::drawing::font is strikeout. More...
 
font_style style () const
 Gets style information for this xtd::drawing::font. More...
 
intptr_t to_hfont () const
 
std::string to_string () const
 Converts this font_family to a human-readable string representation. More...
 
bool underline () const
 Gets a value that indicates whether this xtd::drawing::font is underline. More...
 
graphics_unit unit () const
 Gets the unit of measure for this xtd::drawing::font. More...
 

Static Public Member Functions

static font from_hdc (const intptr_t hdc)
 
static font from_hfont (const intptr_t hfont)
 

Friends

class graphics
 
class system_fonts
 
class xtd::forms::native::font_dialog
 

Detailed Description

Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.


The documentation for this class was generated from the following file: