Home | Libraries | People | FAQ | More |
boost::ui::font — Font class.
// In header: <boost/ui/font.hpp> class font { public: // types typedef void * native_handle_type; // Implementation-defined font type. // Enumaration of font families. enum family { other, serif, sans_serif, cursive, fantasy, monospace }; // Enumaration of font slants. enum slant { normal, italic, oblique }; // Enumaration of font weights. enum weight { normal, bold }; // construct/copy/destruct explicit font(double, family, slant = slant::normal, weight = weight::normal); explicit font(double, const uistring &, slant = slant::normal, weight = weight::normal); font(); ~font(); // public member functions font & set_family(family); family get_family() const; font & set_slant(slant); slant get_slant() const; font & set_weight(weight); weight get_weight() const; font & name(const uistring &); uistring name() const; font & size_pt(double); double size_pt() const; bool valid() const noexcept; // public static functions static font caption() noexcept; };
See Also:
See Also:
See Also:
font
public
construct/copy/destructexplicit font(double pt, family f, slant s = slant::normal, weight w = weight::normal);Creates font.
explicit font(double pt, const uistring & n, slant s = slant::normal, weight w = weight::normal);Creates font.
font();
~font();
font
public member functionsfont & set_family(family f);Sets font family.
family get_family() const;Returns font family.
font & set_slant(slant s);Sets font slant.
slant get_slant() const;Returns font slant.
font & set_weight(weight w);Sets font weight.
weight get_weight() const;Returns font weight.
font & name(const uistring & n);Sets font name.
Throws: |
std::out_of_range If font name isn't supported |
uistring name() const;Returns font name.
font & size_pt(double pt);Sets font size in points.
Throws: |
std::out_of_range If font size isn't positive value |
double size_pt() const;Returns font size in points.
bool valid() const noexcept;Returns true only if font is valid.
font
public static functionsstatic font caption() noexcept;Returns default font used for captioned widgets.