Shows how to use xtd::drawing::font class.
#include <xtd/drawing/font>
#include <xtd/console>
auto main() -> int {
auto font1 =
font {font_family::generic_monospace(), 42.0f, font_style::bold};
console::write_line("font1 = {0}", font1);
auto font2 =
font {
"Times New Roman", 24.0f};
console::write_line("font2 = {0}", font2);
auto font3 =
font {font_family::generic_serif(), 24.0f};
console::write_line("font3 = {0}", font3);
console::write_line("font1 {0} font2", font1 == font2 ? "==" : "!=");
console::write_line("font2 {0} font3", font2 == font3 ? "==" : "!=");
}
Defines a particular format for text, including font face, size, and style attributes....
Definition font.h:45
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.h:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10